while True:
try:
s = input()
l = s.replace("-", "")
total = 0
for i in range(1,10):
total += int(l[i-1])*i
d = total % 11
if d == 10:
if l[-1] == "X":
print("Right")
else:
print(s[:-1]+"X")
else:
if l[-1] == str(d):
print("Right")
else:
print(s[:-1]+str(d))
except EOFError:
break