| Purdue Spring 2026 In-House Contest #3 |
|---|
| Закончено |
Munir and Matthew are playing a high-stakes game on an $$$n\times m$$$ grid. They take turns placing rectangles of size at most $$$k$$$ on the board. It is not allowed to place rectangles that overlap with an existing rectangle on the board. The first player who is unable to place a rectangle loses.
Assuming both players play optimally, with Munir playing first, who wins?
Each test contains multiple test cases. The first line contains the number of test cases $$$t\ (1\le t\le 10^3)$$$. The description of the test cases follows.
The only line of each test case contains three integers $$$n, m, k\ (1\le n,m\le 10^3, 1\le n\cdot m\le 10^3, 1\le k\le n\cdot m)$$$.
It is guaranteed the sum of $$$n\times m$$$ over all test cases does not exceed $$$10^3$$$
For each test case, print 'Munir' (without quotes) if Munir wins. Otherwise, print 'Matthew'.
32 3 13 3 43 4 6
Matthew Munir Munir
In the third sample case, one way Munir can win is by playing a $$$3\times 2$$$ rectangle to split the board into two halves.
| Название |
|---|


