Hide

Problem N
Funny Games

/problems/funnygames/file/statement/en/img-0001.png

Nils and Mikael are intergalaxial fighters. Now they are competing for the planet Tellus. The size of this small and unimportant planet is $1 < X < 500$ gobs. The problem is that their pockets only have room for one gob, so they have to reduce the size of the planet. They have available $1 \leq K \leq 6$ FACTOR-weapons characterized by numbers $F_1, F_2, \dots , F_ k$, all less than $0.9$. As is commonly known, a FACTOR-weapon will blow off part of the planet, thus reducing the planet to a fraction of its size, given by the characteristic. Thus, with e.g. $F_1=0.5$ an application of the first weapon will half the size of the planet. The fighter who reduces the size to less than, or equal to, $1$ gob can take the planet home with him. They take turns attacking the planet with any weapon. If Nils starts, who will win the planet? Assume that both Nils and Mikael are omniscient and always make a winning move if there is one.

Technical note: To ease the problem of rounding errors, there will be no edge cases where an infinitesimal perturbation of the input values would cause a different answer.

Input

The first line of input is $1 \le N\leq 10$, the number of test cases. Each of the next $N$ lines consists of $X$, $K$ and then the $K$ numbers $F_1, F_2, \dots , F_ K$. $K$ is an integer, the other numbers are real numbers with no more than $6$ decimals.

Output

For each test case, produce one line of output with the name of the winner (either Nils or Mikael).

Sample Input 1 Sample Output 1
4
6 2 0.25 0.5
10 2 0.25 0.5
29.29 4 0.3 0.7 0.43 0.54
29.30 4 0.3 0.7 0.43 0.54
Mikael
Nils
Nils
Mikael

Please log in to submit a solution to this problem

Log in