program a020;
var st:string;
i,x,f:longint;
begin
while not eof do begin
readln(st);
x:=ord(st[1])-ord('A')+8;
f:=(x mod 10)*9+(x div 10);
delete(st,1,1);
for i:=1 to 8 do
f:=f+(ord(st[i])-ord('0'))*(9-i);
f:=f+ord(st[9])-ord('0');
if f mod 10=0 then writeln('real') else writeln('fake');
end;
end.
望大牛費費神看看吧