lis = list(map(str,input().split('-')))
lis1 = lis[:-1]
s = ''.join(lis1)
he = 0
j = 1
for i in s:
he =int(i)*j + he
j = j+1
if he%11 == 10:
zuihou = 'X'
else:
zuihou = str(he%11)
if lis[-1] == zuihou:
print('Right')
else:
lis[-1] = zuihou
print('-'.join(lis))