Problem B
Blind Bottles
You are playing the Blind Bottles game. There are $n$ bottles, each with a unique color. The game host arranges them into one row, keeping their ordering a secret. Your goal is to determine the host’s ordering by making guesses. In each guess, you provide one ordering of the bottles. The host will tell you the number of bottles in your ordering that are in the correct positions. You win the game when you make a guess that places all the bottles in their correct positions.
You want to win the game; however, you don’t want to spend all day guessing. Therefore, you have decided that you’d like to win in at most $10^4$ guesses.
Interaction
This is an interactive problem.
At the start of the input, you will receive a single integer $n$ ($2 \leq n \leq 100$), the number of bottles. The bottle colors are labeled with unique integers from $1$ to $n$.
After reading this integer, your program should begin making guesses. In each guess, output a single line of $n$ space-separated integers, which is a permutation of the integers from $1$ to $n$. This permutation represents one guess of the ordering. You will then receive a single integer $k$ ($0 \leq k \leq n$), which is the number of bottles that are in the correct positions in your guess. If $k = n$, you have won the game and your program should terminate. If $k < n$, the game proceeds to the next guess. If you have not won the game after $10^4$ guesses, your program should terminate, and you will receive a Wrong Answer verdict.
Do not forget to flush the output after printing each guess. You will not receive any further input after the game ends – either after you win or after you make $10^4$ guesses.
The judge program is not adversarial, meaning that the ordering of the bottles is fixed at the start of the game and does not change during the game.
| Read | Sample Interaction 1 | Write |
|---|
5
3 2 5 1 4
2
3 5 2 1 4
3
3 4 2 1 5
5
