#define _CRT_SECURE_NO_WARNINGS
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#include <bits/stdc++.h>
using namespace std;
int main()
{
    char buf[20], buf2[20];
    scanf("%s", buf);
    for (char *p1 = buf, *p2 = buf2; *p1; p1++)
        if (*p1 != '-')
            *p2++ = *p1;
    int c = 0;
    for (int i = 0; i < 9; i++)
        c += (buf2[i] - '0') * (i + 1);
    c %= 11;
    if (c == 10) c = 'X' - '0';
    if (buf2[9] == c + '0')
        puts("Right");
    else
        buf[12] = c + '0', puts(buf);
    return 0;
}
