from sys import stdin
a=sys.stdin.read()
en='ABCDEFGHJKLMNPQRSTUVXYWZIO'
xx=10+en.find(a[0])
x2=xx%10
x1=xx//10
#y=x1+x2*9+int(a[1])*8+int(a[2])*7
y=x1+x2*9
for i in range(8,0,-1):
y=y+int(a[9-i])*i
y=y+int(a[9])
if y%10==0:
print("real")
else:
print("fake")