Balloon Colors

No attempts yetTime limit1sMemory limit128 MB

Problem

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 NN problems numbered from 11 to NN. Problem 11 is the easiest and problem NN is the hardest. There are also NN distinct colors, and for simplicity each color gets a number from 11 to NN.

Each color is assigned to exactly one problem. The easiest problem must not get color XX, and the hardest problem must not get color YY.

Given NN, XX, YY and a color assignment, decide whether the assignment satisfies these conditions.

Input

Your program is tested on one or more test cases. The first line of the input contains a single integer TT, the number of test cases (1T1001 \le T \le 100).

The first line of each test case contains three integers separated by single spaces, NN, XX and YY (3N1003 \le N \le 100, 1X,YN1 \le X, Y \le 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 NN integers separated by single spaces, where every integer from 11 to NN 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.

Output

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.