There are multiple test cases. The first line of input contains an integer $T$ $(1 \le T \le 100)$, indicating the number of test cases. For each test case:
The first line contains two integers $n$ and $m$, $(2 \le n \le 10000, 0 \le m \le 100000)$.
Each of the next $m$ lines contains two integer $u, v$ $(1 \le u, v \le n, v \ne u)$ which means there's an undirected edge between vertex $u$ and vertex $v$.
There's at most one edge between any pair of vertices. Most test cases are small.