#include<bits/stdc++.h>
using namespace std;
int main(){
int a=0,b=0,c[15]={0,-1,0,0,0,-1,0,0,0,0,0,-1};
char y;
for(int i=1;i<=12;i++){
cin>>y;
if('0'<=y&&y<='9'){
c[i]=int(y-'0')*i;
a+=c[i]*i;
}
}
cin>>y;
if(y=='X'){
b=10;
}else{
b=int(y-'0');
}
if(b=a%11){
cout<<a<<" "<<b;
cout<<"Right";
}else{
for(int i=1;i<=12;i++){
if(c[i]=-1){
cout<<"-";
}else{
cout<<c[i];
}
}
if(a%11<10) cout<<a%11;
else cout<<"X";
}
}
全红求调