There are vertices numbered from to . You want to add edges to these vertices to construct an undirected graph satisfying all of the following conditions.
The graph does not have to be connected.
Construct any graph satisfying these conditions. If no such graph exists, output -1.
The input is given in the following format.
For each test case, if no graph satisfying the conditions exists, output -1 on a separate line.
Otherwise, output the number of edges on the first line. On each of the following lines, output the two endpoints and of an edge, separated by a space (, ).
In the first three test cases, each vertex has fewer than three other vertices it could connect to, so no valid graph can be constructed.
In the fourth test case, every pair of distinct vertices is connected by an edge. Each vertex is connected to the other three vertices, so every vertex has degree .
In the fifth test case, connect the vertices in the cycle , then add the edges , , and . Every vertex is incident to exactly three edges, and there are no self-loops or duplicate edges.
The first line contains the number of test cases .
The -th of the following lines contains , the number of vertices in the -th test case.
Edges are undirected, so and represent the same edge. You may output the edges in any order and the endpoints of each edge in either order. If multiple valid graphs exist, output any one of them.