list = input().split('-') num = ''.join(list) a,b = num[:-1],num[-1] sum = 0 for i in range(len(a)): sum += int(a[i]) * (i+1) mod = str(sum % 11) if b == mod: print('Right') elif b == 'X' and mod == '10': print('Right') else: if mod == '10': mod = 'X' list[-1] = mod new = '-'.join(list) print(new)