D. Caveman
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

Monocarp drew an undirected graph with $$$n$$$ vertices and $$$m$$$ edges. He wants to color each vertex red or blue so that every vertex has at least one neighbor of the opposite color. He needs to calculate the number of colorings that suit him.

Monocarp is a caveman: he knows only the numbers $$$1$$$, $$$2$$$, and "many" (any number greater than $$$2$$$). He does not know about zero, so if there are no valid colorings, his brain melts.

Help Monocarp count the valid colorings in his language. Two colorings are considered different if at least one vertex has a different color in them.

Input

The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.

The first line of each test case contains two integers $$$n$$$ and $$$m$$$ ($$$3 \le n \le 3 \cdot 10^5$$$; $$$0 \le m \le \min\left(\frac{n(n-1)}{2}, 3 \cdot 10^5\right)$$$) — the number of vertices and edges.

Each of the next $$$m$$$ lines contains two integers $$$u_i$$$ and $$$v_i$$$ ($$$1 \le u_i, v_i \le n$$$) — the numbers of the vertices connected by the $$$i$$$-th edge. The graph has no self-loops or multiple edges.

Additional constraints on the input:

  • the sum of $$$n$$$ over all test cases does not exceed $$$3 \cdot 10^5$$$; also the sum of $$$m$$$ over all test cases does not exceed $$$3 \cdot 10^5$$$.
Output

For each test case, print on a separate line:

  • 1 or 2, if the number of valid colorings is equal to $$$1$$$ or $$$2$$$ respectively;
  • Many, if the number of valid colorings is greater than two;
  • Brain Melt, if there are no valid colorings.
Example
Input
4
3 1
1 2
3 2
1 2
1 3
3 3
1 2
2 3
1 3
4 3
1 2
2 3
3 4
Output
Brain Melt
2
Many
Many