#include <bits/stdc++.h>
using namespace std;
int main(){
    char s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,x;
    int sum,ys;
    cin>>s1>>x>>s2>>s3>>s4>>x>>s5>>s6>>s7>>s8>>s9>>x>>s10;
    sum=(s1-'0')*1+(s2-'0')*2+(s3-'0')*3+(s4-'0')*4+(s5-'0')*5+(s6-'0')*6+(s7-'0')*7+(s8-'0')*8+(s9-'0')*9;
    ys=sum%11;
    if(ys==s10||ys==s10-'0'&&s10=='X') cout<<"Right";
    else{
    	cout<<s1<<"-"<<s2<<s3<<s4<<"-"<<s5<<s6<<s7<<s8<<s9<<"-";
    	if(ys<10) cout<<ys;
    	else cout<<'X';
    }
}
/**************************************************************
	Problem: 1798
	User: wangyiyang
	Language: C++
	Result: Wrong Answer
****************************************************************/