There are multiple test cases. The first line of input contains an integer $T$ (about 350), indicating the number of test cases. For each test case:
The first line contains two integers $n$ and $m$ $(3 \le n \le 10^4, n \le m \le n + 4)$ -- the number of vertices and the number of edges.
Each of the following $m$ lines contains two integers $a_i$ and $b_i$ which denotes an edge between vertices $a_i$ and $b_i$ $(1 \le a_i, b_i \le n, a_i \ne b_i)$.
It is guaranteed that the graph is connected and does not contain multiple edges.