WorldQuant Round 1 (Codeforces Round 1128, Div. 1 + Div. 2)
C
I Know About a Million Things
Codeforces
1000
原题
← BD1 →
翻译中…

Moggity and Larpity are playing a game with an array $a_1, a_2, \ldots, a_n$ of positive integers. Moggity moves first, and then the players alternate turns.

翻译中…

On their turn, a player chooses a non-empty set of positions of the array and removes the elements at these positions. Such a move is allowed only if at least one of the following conditions holds:

翻译中…
  • exactly one element is removed;
  • the sum of the removed elements is even.
翻译中…

A player who cannot make a move loses. In other words, the player who faces an empty array loses.

翻译中…

Determine which player has a winning strategy.

翻译中…

Input

翻译中…

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 a single integer $n$ ($1 \le n \le 1\,000\,000$) — the length of the array.

翻译中…

The second line of each test case contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \le a_i \le 1\,000\,000$) — the elements of the array.

翻译中…

It is guaranteed that the sum of $n$ over all test cases does not exceed $1\,000\,000$.

翻译中…

Output

翻译中…

For each test case, print "Moggity" if Moggity has a winning strategy, and "Larpity" otherwise.

翻译中…

You can output the answer in any case (upper or lower). For example, the strings "MoggItY", "MOGGITY", "moggity", and "mOGGity" will be recognized as a win for Moggity.

翻译中…

Note

翻译中…

In the first test case, Moggity removes the only element, and Larpity faces an empty array.

翻译中…

In the second test case, Moggity cannot remove both elements at once, because $2 + 3 = 5$ is odd. Whichever single element he removes, Larpity removes the remaining one, and then Moggity faces an empty array. Therefore, Larpity wins.

翻译中…

样例

Input #1
3
1
7
2
2 3
6
1000000 999999 5 4 3 2
Output #1
Moggity
Larpity
Moggity
InputCopy OutputCopy
题目信息
题号
2261C
时间限制
2 s
内存限制
256 MB
标签
博弈论
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。