#include<bits/stdc++.h>
using namespace std;
int main(){
string input;
cin>>input;
int change[26]={10,11,12,13,14,15,16,17,34,18,19,20,21,22,35,23,24,25,26,27,28,29,32,30,31,33};
int en=change[input[0]-'A'];
int sum=0;
sum+=en/10+(en%10)*9;
for(int i=1;i<9;i++)
sum+=(input[i]-'0')*(9-i);
sum+=input[9]-'0';
if(sum%10==0)
cout<<"real";
else
cout<<"fake";
}