#include<stdio.h>
char m[256];
char a;
char num[10];
int main(void){
m['A'] = 10, m['B'] = 11, m['C'] = 12, m['D'] = 13,
m['E'] = 14, m['F'] = 15, m['G'] = 16, m['H'] = 17,
m['I'] = 34, m['J'] = 18, m['K'] = 19, m['L'] = 20,
m['M'] = 21, m['N'] = 22, m['O'] = 35, m['P'] = 23,
m['Q'] = 24, m['R'] = 25, m['S'] = 26, m['T'] = 27,
m['U'] = 28, m['V'] = 29, m['W'] = 32, m['X'] = 30,
m['Y'] = 31, m['Z'] = 33;
scanf("%c",&a);
for(int i=0;i<9;i++){
scanf("%c",&num[i]);
}
int sum;
sum=((m[a]/10)+(m[a]%10)*9+(num[0]-48)*8+(num[1]-48)*7+(num[2]-48)*6+(num[3]-48)*5+(num[4]-48)*4+(num[5]-48)*3+(num[6]-48)*2+(num[7]-48)*1+num[8]-48);
if(sum%10==0){
printf("real");
}else{
printf("fake");
}
return 0;
}