#include <iostream>
using namespace std;
int main(int argc, char** argv) {
char name[10];
int total=0;
cin>>name;
for(int i = 0 ,j=9; i<10;i++,j--){
if(name[i]>64&&name[i]<91){
if(name[i]=='W')
total+=3+2*9;
else if(name[i]=='X')
total+=3;
else if(name[i]=='Y')
total+=12;
else if(name[i]=='I')
total+=3+4*9;
else if(name[i]=='O')
total+=3+5*9;
else if(name[i]>79||name[i]<87)//P~V
total+=2+(int(name[i])-77)*j;
else if(name[i]=='Z')
total+=3+3*9;
else if(name[i]=='J')
total+=1+8*9;
else if(name[i]=='K')
total+=1+9*9;
else if(name[i]=='L')
total+=2;
else if(name[i]=='M')
total+=2+1*9;
else if(name[i]=='N')
total+=2+2*9;
else{
int abc=int(name[i])-55;
total+=(abc%10)*j;
total+=1;
}
}
else{
total+=(int(name[i])-48)*j;
if(j==1) j++;
}
}
//cout<<total<<' '<<1+((int(name[0])-55)%10)*9<<' '<<int(name[0]);
if(total%10)
cout<<"fake";
else
cout<<"real";
else if(name[i]>79||name[i]<87)//P~V
||改成&&
AC了感謝!!!!