Time Limit: 2000/1000 MS (Java/Others)

Memory Limit: 32768/32768 K (Java/Others)

Alice and Bob are interested in playing games. One day, they invent a game which has rules below:

**1. ** Firstly, Alice and Bob choose some random positive integers, and here we describe them as n, d_{1}, d_{2},..., d_{m}.

**2. ** Then they begin to write numbers alternately. At the first step, Alice has to write a “0”, here we let s_{1} = 0 ; Then, at the second step, Bob has to write a number s_{2} which satisfies the condition that s_{2} = s_{1} + d_{k} and s_{2} <= n, 1<= k <= m ; From the third step, the person who has to write a number in this step must write a number s_{i} which satisfies the condition that s_{i} = s_{i-1} + d_{k} or s_{i} = s_{i-1} - d_{k} , and s_{i-2} < s_{i} <= n, 1 <= k <= m, i >= 3 at the same time.

**3. ** The person who can’t write a legal number at his own step firstly lose the game.

Here’s the question, please tell me who will win the game if both Alice and Bob play the game optimally.

Here’s the question, please tell me who will win the game if both Alice and Bob play the game optimally.

At the beginning, an integer T indicating the total number of test cases.

Every test case begins with two integers n and m, which are described before. And on the next line are m positive integers d_{1}, d_{2},..., d_{m}.

T <= 100;

1 <= n <= 10^{6};

1 <= m <= 100;

1 <= d_{k} <= 10^{6}, 1 <= k <= m.

Every test case begins with two integers n and m, which are described before. And on the next line are m positive integers d

T <= 100;

1 <= n <= 10

1 <= m <= 100;

1 <= d

提交代码