| Codeforces Round 1023 (Div. 2) |
|---|
| Finished |
Tom and Jerry found some apples in the basement. They decided to play a game to get some apples.
There are $$$n$$$ boxes, and the $$$i$$$-th box has $$$a_i$$$ apples inside. Tom and Jerry take turns picking up apples. Tom goes first. On their turn, they have to do the following:
If both players play optimally, predict the winner of the game.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). The description of the test cases follows.
The first line of each test case contains two integers $$$n,k$$$ ($$$2 \le n \le 10^5,1\le k \le 10^9$$$).
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^9$$$).
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^5$$$.
For each test case, print "Tom" (without quotes) if Tom will win, or "Jerry" (without quotes) otherwise.
33 12 1 23 11 1 32 11 4
Tom Tom Jerry
Note that neither player is necessarily playing an optimal strategy in the following games, just to give you an idea of how the game is going.
In the first test case of the example, one possible situation is shown as follows.
| Name |
|---|


