題目

解答

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
dic = { "A": 10, "J": 18, "S": 26,
"B": 11, "K": 19, "T": 27,
"C": 12, "L": 20, "U": 28,
"D": 13, "M": 21, "V": 29,
"E": 14, "N": 22, "W": 32,
"F": 15, "O": 35, "X": 30,
"G": 16, "P": 23, "Y": 31,
"H": 17, "Q": 24, "Z": 33,
"I": 34, "R": 25}
n = [str(i) for i in input()]
m = dic[n[0]]//10 + dic[n[0]]%10*9
for i,j in enumerate(map(int,n[1:9])):
m+=j*(8-i)
if (m+int(n[9]))%10 == 0:
print('real')
else:
print('fake')