Farmer John and his archnemesis Farmer Nhoj are playing a game in a circular barn. There are N (1≤N≤105) rooms in the barn, and the ith room initially contains a_i cows (1≤a_i≤5⋅106). The game is played as follows:
Determine the farmer that wins the game if both farmers play optimally.
The input contains T test cases. The first line contains T (1≤T≤1000). Each of the T test cases follow.
Each test case starts with a line containing N, followed by a line containing a_1,…,a_N.
It is guaranteed that the sum of all N is at most 2⋅105.
For each test case, output the farmer that wins the game, either "Farmer John" or "Farmer Nhoj."
For the first test case, Farmer John can remove 1, 2, or 3 cows from the first room. Whichever number he removes, Nhoj can remove the remaining cow(s), forcing FJ to lose when they circle back to the first room.
For the second test case, FJ can remove 5 cows, forcing Nhoj to work with only 4 cows remaining. Now, Nhoj can either remove 1, 2, or 3 cows. This is now similar to the first test case.
For the third and fourth test cases, FJ can immediately remove all the cows from the first room, forcing Nhoj to lose.
For the fifth test case, FJ can remove 1, 2, or 3, cows from the first room, and Nhoj can remove the rest right after. When they circle back around to the first room, FJ will lose.