#include<iostream>
#include<string>
using namespace std;
int main()
{
string s,s1;
int n,sum;
cin>>s;
for(int i=0;i<=s.length()-2;i++)
{
if(s[i]<='9' && s[i]>='0')
{
s1+=s[i];
}
}
// sum=sum%11;
for(int i=0;i<s1.length();i++)
{
sum+=(s1[i]-'0')*(i+1);
}
sum%=11;
int res=stoi(s.substr(s.length()-1));
// cout<<res;
if(sum==res) cout<<"Right";
else cout<<s.substr(0,s.length()-1)<<sum;
}