시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB3410969.231%

문제

This is an interactive problem.

A game with permutations has the following rules. The judge program first generates some permutation $p$ of length $N$ and tells you $N$. This permutation is never changed throughout the game.

Your task is to guess the permutation. For that purpose, you may use permutations of length $N$ as queries. Let's see how the jury program answers them.

  • When the jury program receives a permutation $q$, it checks positions $Q_i$ of each integer from 1 to $N$ in this permutation. For example, for permutation $q = (2,3,1,4,5)$, we get $Q = (3,1,2,4,5)$.
  • Same calculation is applied to the permutation $p$, and integers $P_1 \ldots P_N$ are calculated. For example, for permutation $p = (5,2,1,4,3)$, we get $P = (3,2,5,4,1)$.
  • Finally, the jury program calculates an array $D$ such that $D_i=|P_i-Q_i|$ and returns it to your program sorted in ascending order.
  • For the example above, $D = (0,1,3,0,4)$, and you will receive these integers in sorted order: $(0,0,1,3,4)$.

Note that you can ask no more than 240 queries before you tell the answer.

프로토콜

First your program reads a single integer $N$ ($1 \le N \le 400$) --- the length of the permutation you need to guess.

After that you can make queries. Each query consists of $n+1$ space-separated tokens. The first token is '?', then the permutation you are using in the query follows. Don't forget to terminate the line by the end-of-line character and to flush the output after sending the query. Then you read the jury program's answer --- a sorted array of $n$ integers.

When you are ready to guess the permutation, print $n+1$ space-separated tokens: the first token is '!' and then the permutation you guess follows.

예제 입력 1

5

0 0 1 3 4

0 0 2 2 4

0 2 2 2 2

0 0 0 0 0

예제 출력 1


? 2 3 1 4 5

? 1 2 3 4 5

? 5 4 3 2 1

? 5 2 1 4 3

! 5 2 1 4 3

채점 및 기타 정보

  • 예제는 채점하지 않는다.