import java.io.*;
import java.util.*;
public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
public static void main(String[] args) throws IOException{
String str;
int i,count,sum;
Character[] array = new Character[]{'0','1','2','3','4','5','6','7','8','9','X'};
count = 1;
sum = 0;
StringBuilder sb = new StringBuilder();
str = br.readLine();
for(i = 0 ; i < str.length() - 1 ; i++){
sb.append(str.charAt(i));
if(str.charAt(i) == '-'){
continue;
}
sum += Integer.parseInt(String.valueOf(str.charAt(i))) * count;
count++;
}
if(array[sum%11] == str.charAt(str.length()-1)){
out.write("Right");
}
else{
sb.deleteCharAt(sb.length()-1);
sb.append("-").append(array[sum % 11]);
out.write(String.valueOf(sb));
}
out.flush();
out.close();
br.close();
}
}
ps:不要用split将str分割成数组,这样子会是O(mn)会超时