l=input().split('-')
s=l[0]+l[1]+l[2]
n=0
d=0
for i in s:
n=n+1
d=d+int(i)*n
d=d%11
if d==10:
if l[3]=='X':
print('Right')
else:
print('{}-{}-{}-{}'.format(l[0],l[1],l[2],'X'))
else:
if l[3]==str(d):
print('Right')
else:
print('{}-{}-{}-{}'.format(l[0],l[1],l[2],d))
当输入为6-670-82162-X,输出'Right'。唯一一组WA。