a,b,c,d=input().split("-")

e=a+b+c
# print(e)
# print(d)
# print(len(e))
q=[x for x in range(1,10)]
s=0
for i in range(len(e)):
    s=s+int(e[i])*q[i]

r=s%11
if d=="X" and r==10:
    print("Right")
elif d=="X" and r!=10:
    print(a+"-"+b+"-"+c+"-"+str(r))
elif d!="X" and r==10:
    print(a+"-"+b+"-"+c+"-"+"X")
elif r==int(d):
    print("Right")
else:
    print(a+"-"+b+"-"+c+"-"+str(r))
  • 大佬们的方法太妙了 值得反复看