Start: Apr, 17, 2017 10:00:00
Python程序设计基础培训第四次作业
End: Apr, 23, 2017 14:00:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 137ms
Memory: 21428kB
Author: 18958329966
In contest: 1088

while True:
	try:
		str1=raw_input()
		n=len(str1)
		t=1
		s=0
		for i in range(n-1):
			if str1[i]>="0" and str1[i]<="9":
				s+=int(str1[i])*t
				t+=1
		s=s%11
		if s==10:
			if str1[-1]=="X":
				print "Right"
			else:
				print str1[0:12]+"X"
		else:
			if str1[-1] == "X":
				print str1[0:12]+str(s)
			elif s==int(str1[-1]):
				print "Right"
			else:
				print str1[0:12]+str(s)
	except EOFError:
		break