#include<bits/stdc++.h>
#define ull unsigned long long
using namespace std;
string n,m;
ull a,b,c,d,e,f,g,h,i,x,y;
int main()
{
cin>>n;
a=n[0]-48;b=n[2]-48;
c=n[3]-48;d=n[4]-48;
e=n[6]-48;f=n[7]-48;
g=n[8]-48;h=n[9]-48;
i=n[10]-48;
x=n[12]-48;
y=a*1+b*2+c*3+d*4+e*5+f*6+g*7+h*8+i*9;
if(y%11==x) cout<<"Right";
else
{
if(y%11==10)
cout<<a<<'-'<<b<<c<<d<<'-'<<e<<f<<g<<h<<i<<'-'<<'X';
if(y%11<10)
cout<<a<<'-'<<b<<c<<d<<'-'<<e<<f<<g<<h<<i<<'-'<<y%11;
}
return 0;
}
80分,不知道哪里出错了