Intriguing Selection

아직 제출이 없습니다시간 제한5초메모리 제한512 MB

문제

This is an interactive problem.

You are the head coach of a chess club. The club has 2n2n players, each player has some strength which can be represented by a number, and all those numbers are distinct. The strengths of the players are not known to you.

You need to select nn players who would represent your club in the upcoming championship. Naturally, you want to select nn players with the highest strengths.

You can organize matches between the players to do that. In every match, you pick two players, they play some games, and you learn which one of the two has higher strength. You can wait for the outcome of a match before deciding who will participate in the next one.

However, you do not want to know exactly how those nn players compare between themselves, as that would make the championship itself less intriguing. More formally, you must reach a state where there is exactly one way to choose nn players with the highest strengths that is consistent with the outcomes of the matches you organized, but there must be at least two possible orderings of those nn players by strength that are consistent with the outcomes of the matches you organized.

힌트

In the example, the players in the first test case are sorted by strength in decreasing order. From the matches in the example output, we can deduce that players 1, 2, and 3 have the highest strength, but we do not know how the player 1 compares to the player 2.