Choosing a balloon color for every problem is one of the jobs we do every year, and sometimes it gets tricky.
Some contestants assume the color follows the difficulty. For example, they expect the easiest problem to be red and the hardest problem to be black.
We do not want those assumptions to hold, so we added a constraint on the easiest and the hardest problem.
There are N problems numbered from 1 to N. Problem 1 is the easiest and problem N is the hardest. There are also N distinct colors, and for simplicity each color gets a number from 1 to N.
Each color is assigned to exactly one problem. The easiest problem must not get color X, and the hardest problem must not get color Y.
Given N, X, Y and a color assignment, decide whether the assignment satisfies these conditions.
Your program is tested on one or more test cases. The first line of the input contains a single integer T, the number of test cases (1≤T≤100).
The first line of each test case contains three integers separated by single spaces, N, X and Y (3≤N≤100, 1≤X,Y≤N): the number of problems, the color the easiest problem must not get, and the color the hardest problem must not get.
The next line contains N integers separated by single spaces, where every integer from 1 to N appears exactly once. The first integer is the color of the first problem, the easiest one, the second integer is the color of the second problem, and the last integer is the color of the hardest problem.
For each test case, print one of the following four words on a single line.
BOTH: both the easiest and the hardest problem got a color they must not get.EASY: only the easiest problem got a color it must not get.HARD: only the hardest problem got a color it must not get.OKAY: both problems got colors they are allowed to get.