#include<iostream>
using namespace std;
int main()
{
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;
}