시간 제한
메모리 제한
시간 제한
1초
메모리 제한
128 MB
There is a permutation a of size n that you have to guess interactively.
You are allowed to make queries of the following kind. You output any permutation b of size n. The information given back to you is the length of the longest common subsequence of permutations a and b.
The first line of the standard input contains integer n, the size of the permutation (1 ≤ n ≤ 40).
Each of the next lines of the standard input contains response to your query — the length of the longest common subsequence of the permutation queried by you and the permutation a.
Each line of the standard output should contain a space-separated list of integers that form a permutation you’re querying.
Your can make at most 5n2 queries.
You must flush the standard output after printing each line. You must not print any lines after you receive the response n, just exit.