from operator import index
number =input().split('-')
list1 = []
for i in number:
    for c in i:
        list1.append(c)
sum = 0
for j in range(0, len(list1)-1):
    sum += int(list1[j])*(j+1)
total = sum%11
if(total==10):
    total = 'X'
else:
    total = str(total)
if(list1[-1]==total):
    print('Right')
else:
    number.pop(3)
    print(f'{number[0]}-{number[1]}-{number[2]}-{total}')