#include <bits/stdc++.h>
using namespace std;
int main() {
char ch;
int a,b,c,d,e,f,g,h,i,j,k,sum;
while(cin>>ch>>a>>b>>c>>d>>e>>f>>g>>h>>i){
if(ch=='A')j=10;
else if(ch=='B')j=11;
else if(ch=='C')j=12;
else if(ch=='D')j=13;
else if(ch=='E')j=14;
else if(ch=='F')j=15;
else if(ch=='G')j=16;
else if(ch=='H')j=17;
else if(ch=='I')j=34;
else if(ch=='J')j=18;
else if(ch=='K')j=19;
else if(ch=='L')j=20;
else if(ch=='M')j=21;
else if(ch=='N')j=22;
else if(ch=='O')j=35;
else if(ch=='P')j=23;
else if(ch=='Q')j=24;
else if(ch=='R')j=25;
else if(ch=='S')j=26;
else if(ch=='T')j=27;
else if(ch=='U')j=28;
else if(ch=='V')j=29;
else if(ch=='W')j=32;
else if(ch=='X')j=30;
else if(ch=='Y')j=31;
else if(ch=='Z')j=33;
}
k=((j/10)+((j%10)*9));
sum=(k)+(8*a)+(7*b)+(6*c)+(5*d)+(4*e)+(3*f)+(2*g)+(1*h)+(i);
if(sum%10==0){
cout<<"real"<<endl;
}else{
cout<<"fake"<<endl;
}
return 0;
}