import java.io.PrintStream; import java.util.StringTokenizer; import type.util.Scanner; public class A { public static void main(String[] args) { PrintStream output = System.out; Scanner input = new Scanner(System.in); final double EPSILON = 0.00001; int timeOfE = input.nextInt() + input.nextInt(); double threshold = (Math.sqrt(1 + 8 * timeOfE) - 1) / 2; StringTokenizer tokenizer = new StringTokenizer(input.nextLine()); while (tokenizer.hasMoreTokens()) { int difficulty = Integer.parseInt(tokenizer.nextToken()); if (Math.abs(difficulty - threshold) < EPSILON) { output.println("tie"); } else if (difficulty < threshold) { output.println("F"); } else { output.println("E"); } } } }