K. Nim X2
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

After $$$114^{514}$$$ times of playing the nim game, Mandy and brz are now tired of it. So they invent a nim x2 game with similar rules. The only difference between nim x2 game and common nim game is: After every operation by one, the number of every pile of stones doubles.

Formally speaking, there are $$$n$$$ piles of stones initially, where the $$$i$$$-th pile contains $$$a_i$$$ stones. Mandy and brz take turns to play, with Mandy first. In one operation, one can choose a non-empty pile, and take some stones away (cannot be zero). After the operation, for all $$$i\in[1,n]$$$, $$$a_i$$$ becomes $$$2\times a_i$$$. The one who takes the last stone wins.

Now given the initial situation, can you secretly tell brz who will win if both of them play optimally?

In addition, if the game continues after $$$514^{114}$$$ rounds of operation, you just need to tell him draw.

Input

The first line contains one integer $$$T(1\leq T\leq 10^5)$$$, indicating the number of test cases.

Each of the test cases contains two lines. The first line contains one integer $$$n(1\leq n\leq 10^6)$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \cdots, a_n(1\leq a_i\leq 10^9)$$$.

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^6$$$.

Output

print $$$T$$$ lines. If brz will win, print brz, or if Mandy will win, print Mandy. Otherwise print draw.

Example
Input
3
1
3
2
1 1
4
114 514 1919 817
Output
Mandy
brz
draw