Go to the finals#9634

Go to the finals

1 second
128 megabytes
Very easy

Welcome to the semifinal round of the Olympiad! In order to successfully pass this round, the organisers consider that the average student's grade should be no less than , and the grade for computer science should be or . The organisers also believe that not all students will be able to go to the finals, but they may be wrong, as this task is still not solved. Solve this problem by writing a program that will be able to identify students who have passed and have not passed to the final round.

Input

First line contains the number of students (1 \leq n \leq 1000). Each of the next lines contains: number x_i (0.0 < x_i \leq 5.0) — average grade of the -th student and one symbol y_i (y_i \in \{A, B, C, D, E, F\}) — computer science grade of this student. Students are numbered from to .

Output

For each student in a separate line print if the student goes to the final, or otherwise.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading