#include <stdio.h>
#include <stdlib.h>
int main(int argc, const char * argv[]) {
char array[26] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L',
'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'X', 'Y', 'W', 'Z', 'I', 'O'};
int Follow_up_code, Final_Number;
int i = 0;
char First_letter;
char IDNUMBER[11];
fgets(IDNUMBER,sizeof(IDNUMBER),stdin);
Final_Number = 0;
First_letter = IDNUMBER[0];
IDNUMBER[0] = '0';
Follow_up_code = atoi(IDNUMBER);
for(i = 0;i < 26;i ++)
if(array[i] == First_letter)
{
Final_Number = i + 10;
break;
}
Final_Number = Final_Number % 10 * 9 + Final_Number / 10;
Final_Number = Final_Number + Follow_up_code % 10;
Follow_up_code /= 10;
for(i = 1;i < 9;i ++)
{
Final_Number = Final_Number + Follow_up_code % 10 * i;
Follow_up_code = Follow_up_code / 10;
}
if(Final_Number % 10 == 0)
printf("real\n");
else
printf("fake\n");
return 0;
}