package practiceofcsp;
import java.util.Scanner;
public class StrPractice {
public static void main(String[] args) {
// System.out.println(Integer.parseInt("323"));//把字符串变成整数
// System.out.println("s23".charAt(0));//这个函数返回的是char
// System.out.println(String.valueOf('2'));//这个函数可以把char变成String
// char a="232".charAt(0);
// System.out.println(Integer.parseInt(String.valueOf((a))));//char可以和int 相互转换
Scanner sc=new Scanner(System.in);
String s=sc.nextLine();
int result=0;
int c=0;
for(int i=0;i<s.length()-1;i++) {
if(s.charAt(i)=='-') {
continue;
}
else {
c+=1;
result+=c*Integer.parseInt(String.valueOf(s.charAt(i)));
}
}
result=result%11;
char compare=s.charAt(s.length()-1);
// System.out.println("(char)compare"+compare);
// System.out.println("(int)compare"+(int)compare);
if(compare=='X'&&result==10||(int)compare==result+48) {
System.out.println("Right");
}
else {
// for(int i=0;i<s.length()-1;i++) {
// System.out.print(s.charAt(i));
// }
//上述for循环可用s.substring(0,length-1)直接输出0-length-2位
System.out.print(s.substring(0, s.length()-1));
if(result==10) {
System.out.println('X');
}
else {
System.out.println(result);
}
}
}
}