#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(){
int sum=1,w=0;
string st;
getline(cin,st);
int l=st.size();
for(int i=0;i<l-1;i++){
if(st[i]!='-'){
w+=(st[i]-'0')*sum;
sum++;
}
}
//cout<<w%11<<endl;
int x=st[l-1]-'0';
if(w%11==x){
cout<<"Right";
return 0;
}
else {
if(w%11==10&&st[l-1]=='X'){
cout<<"Right";
return 0;
}
else{
for(int i=0;i<l-1;i++){
cout<<st[i];
}
if(w%11!=10) cout<<w%11;
else cout<<"X";
}
}
return 0;
}