import java.util.Scanner;

// 注意:10要和X等价
public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int count = 1;
        int sum = 0;
        for (int i = 0; i < s.lastIndexOf("-"); i ++) {
            if (s.charAt(i) == '-') {
                continue;
            }
            // 字符会按照ASCII码转换
            sum += Integer.valueOf(s.charAt(i) + "") * count;
            count ++;
        }

        int id = sum % 11;
        String idx = (id == 10 ? "X" : id + "");
        String oriId = s.substring(s.lastIndexOf("-") + 1);
        if (idx.equals(oriId)) {
            System.out.println("Right");
        } else {
            System.out.println(s.substring(0, s.lastIndexOf("-") + 1) + idx);
        }
    }
}