char s[26]={1,0,9,8,7,6,5,4,9,3,2,2,1,0,8,9,8,7,6,5,4,3,1,3,2,0},i=9;*s=s[getchar()-'A'];while((i--)-1)*s=(*s+(getchar()-'0')*i)%10;*s=(*s+getchar()-'0')%10;printf("%s",*s?"fake":"real");