import java.util.Scanner;
public class a {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
long[] letterpow = new long[] { 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 };
while (scan.hasNextLine()) {
String x = scan.nextLine();
long k = letterpow[x.charAt(0) - 'A'];
long o = k / 10 + k % 10 * 9 + (x.charAt(1) - '0') * 8 + (x.charAt(2) - '0') * 7 + (x.charAt(3) - '0') * 6
+ (x.charAt(4) - '0') * 5 + (x.charAt(5) - '0') * 4 + (x.charAt(6) - '0') * 3
+ (x.charAt(7) - '0') * 2 + x.charAt(8) - '0' + x.charAt(9) - '0';
System.out.println(o % 10 == 0 ? "real" : "fake");
}
scan.close();
}
}