Given an undirected connected graph with n vertices and m edges, your task is to find a spanning tree of the graph such that for every vertex in the spanning tree its degree is not larger than 2n.
Recall that the degree of a vertex is the number of edges it is connected to.
There are multiple test cases. The first line of the input contains an integer T indicating the number of test cases. For each test case:
The first line contains two integers n and m (2≤n≤105, n−1≤m≤2×105) indicating the number of vertices and edges in the graph.
For the following m lines, the i-th line contains two integers u_i and v_i (1≤u_i,v_i≤n) indicating that there is an edge connecting vertex u_i and v_i. Please note that there might be self loops or multiple edges.
It's guaranteed that the given graph is connected. It's also guaranteed that the sum of n of all test cases will not exceed 5×105, also the sum of m of all test cases will not exceed 106.
For each test case, if such spanning tree exists first output "Yes" (without quotes) in one line, then for the following (n−1) lines print two integers p_i and q_i on the i-th line separated by one space, indicating that there is an edge connecting vertex p_i and q_i in the spanning tree. If no valid spanning tree exists just output "No" (without quotes) in one line.
For the first sample test case, the maximum degree among all vertices in the spanning tree is 3 (both vertex 1 and vertex 4 has a degree of 3). As 3≤26 this is a valid answer.
For the second sample test case, it's obvious that any spanning tree will have a vertex with degree of 2, as 2>23 no valid answer exists.