You are given a forest. Find a Hamiltonian path for its complement graph or determine if it does not contain any Hamiltonian path.
A forest is a graph with no cycles.
A Hamiltonian path is a path which visits every vertex exactly once.
A graph

's complement graph is a graph

on the same vertices such that two distinct vertices of

are adjacent if and only if they are not adjacent in

.
输入描述:
The first line contains one integer
(
), representing the number of test cases.
For each test case, the first line contains two integers
(
,
), representing the number of vertices and the number of edges.
The following
lines each contain two integers
(
,
), representing an edge.
It is guaranteed that the given graph is a forest, and
.
输出描述:
For each test case, if it is impossible to find a Hamiltonian path on the graph's complement, output
in a single line.
Otherwise, output
distinct integers
(
) in a line, where edge
(
) is in
's complement graph. If there are multiple answers, output any.
示例1
输入
复制
5
3 2
1 2
2 3
2 0
4 3
1 2
2 3
2 4
5 2
1 5
2 3
5 4
1 2
1 3
2 4
2 5
输出
复制
-1
1 2
-1
2 1 4 3 5
1 5 4 3 2