#include<bits/stdc++.h>
using namespace std;
int main()
{
long long a,b,c,d,e,f,g,h,k,l;
scanf("%d-%d%d%d-%d%d%d%d%d-%d",a,b,c,d,e,f,g,h,k,l);
long long s=a*1+b*2+c*3+d*4+e*5+f*6+g*7+h*8+k*9;
s=s%11;
if(s==l)
{
cout<<"Right";
}
else
{
cout<<a<<"-"<<b<<c<<d<<"-"<<e<<f<<g<<h<<k<<"-"<<s;
}
}