Ashish and Jeel are playing a game. They are given a multiset of arrays (initially only one array is present).
A player has to make the following move in their turn:
- Select one of the arrays of size greater than \(1\).
- Divide the array into two non-empty parts such that every element of the left array is smaller than every element of the right array.
Formally, if we split an array \(A\) of size \(N\) into arrays \(L\) and \(R\), then the following conditions must hold:
- \(L\) must be a non-empty prefix and \(R\) must be the remaining non-empty suffix of the array \(A\) respectively.
- For every element \(P_i\) of \(L\) and every element \(Q_j\) of \(R\), the inequality \(P_i \lt Q_j\) must hold.
A player loses if he cannot make a move. Both the players play the game optimally. If Jeel plays first, then determine who wins the game.
Input format
- First line: An integer \(T\) denoting the number of test cases
- Each test case:
- First line: An integer \(N\) denoting the size of the array
- Second line: \(N\) space separated integers, the \(i^{th}\) integer being \(A_i\)
Output format
For each test case, print the winner of the game "Jeel" or "Ashish" (without quotes).
Answer for each test case should come in a new line.
Input Constraints
\(1 \le T \le 10\)
\(1 \le N \le 10^5\)
\(1 \le A_{i}\le 10^9\)
In the first testcase, no matter what move Jeel makes first, Ashish can always make the second move, and Jeel will be left with 3 arrays of size 1. Hence Ashish wins.
In the second testcase, Jeel cannot make any move in the first turn itself, and hence he loses.
In the third testcase, there is only one possible move, and after Jeel cut the array into [1, 1] and [3], Ashish cannot make any move, and he loses.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor