There is a hidden undirected tree with vertices numbered from to . Its edges are numbered from to . You know , but you do not know the endpoints of any edge.
In one query, choose a set of edge numbers. The judge keeps exactly those edges and removes all other edges. For each vertex, the judge returns the smallest vertex number in its connected component. An isolated vertex forms a component by itself.
Each query is applied independently to the original hidden tree. The tree and its edge numbers remain fixed throughout the interaction.
Determine the two endpoints of every edge using at most queries.
Initial input:
Query (at most ):
Choose distinct edge numbers . Read the reply in vertex order:
Final answer (not counted as a query):
Here are the endpoints of edge , in either order.
Print each command on one line with exactly the shown tokens, followed by a newline and flush. After the final answer, exit without reading a reply.
For invalid commands, excess queries or a wrong answer, the judge sends -1 and stops; exit immediately on -1.