#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;
int main() {
int num=0,total=0;
int f = 8;
string a;
cin >> a;
string alphabet= "ABCDEFGHJKLMNPQRSTUVWXYZIO";
for (int c = 0; c < 26; c++)
{
if (a[0] == alphabet[c])
{
num = c + 10;
break;
}
}
total = (num / 10) + ((num % 10) * 9);
for (int e = 1; e < a.length(); e++)
{
if (f == 0)
{
total += (a[e]-48);
}
else
{
total += (a[e]-48) * f;
}
f--;
}
if (total % 10 == 0)
{
cout << "real";
}
else if(total==0)
{
cout << "fake";
}
else
{
cout << "fake";
}
return 0;
}