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: 128ms
Memory: 21428kB
Author: shanzhenyu
In contest: 1088

while True:  
	try:  
		a = raw_input()
		sum = int(a[0]) + int(a[2])*2 + int(a[3])*3 + int(a[4])*4 + int(a[6])*5 + int(a[7])*6 + int(a[8])*7 + int(a[9])*8 + int(a[10])*9
		sum %= 11
		if a[12] == 'X':
			if sum == 10:
				print 'Right'
			else:
				a = a[:12] + str(sum)
				print a
		else:
			if int(a[12]) == sum:
				print 'Right'
			else:
				if sum == 10:
					a = a[:12] + 'X'
				else:
					a = a[:12] + str(sum)			 
				print a
	except EOFError:  
		break