#include<iostream>
using namespace std;
int main()
{
//x-xxx-xxxxx-x
//对067082162这9个数字,从左至右,分别乘以1,2,...,9再求和,即0×1+6×2+……+2×9=158
int a,b,c,d,e,f,g,h,i,m;
char j,k,l;
cin>>a>>j>>b>>c>>d>>k>>e>>f>>g>>h>>i>>l>>m;
int code;
code=(a*1+b*2+c*3+d*4+e*5+f*6+g*7+h*8+i*9)%11;
if(code==m)
{
cout<<"Right";
}
else
{
cout<<a<<j<<b<<c<<d<<k<<e<<f<<g<<h<<i<<l<<code;
}
return 0;
}