408403: GYM103114 G Guess Permutation

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

G. Guess Permutationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

This is an interactive problem.

$$$Kwords$$$ has a permutation $$$a_1,a_2,...,a_n$$$ of $$$1$$$ to $$$n$$$, now you can ask him no more than $$$10$$$ questions to guess the permutation.

For each query, you can give him a set $$$s$$$ of $$$k(1\leq k\leq n)$$$ indexes, he will give you a sorted array of $$$[a_{s_1}, a_{s_2},...,a_{s_{k}}]$$$.

$$$Kwords$$$ thinks the problem is very interesting and invites you to solve it with him.

Input

The first line contains a single integer $$$n(1\leq n\leq 1000)$$$.

Output

When you are ready to answer, print a single line of the form "! $$$a_1$$$ $$$a_2$$$ $$$…$$$ $$$a_n$$$" $$$(1\leq a_i \leq n)$$$, where $$$a$$$ is a permutation.

Interaction

When you are ready to query, print a single line of the form "$$$k$$$ $$$s_1$$$ $$$s_2$$$ $$$…$$$ $$$s_k$$$" $$$(1\leq k,s_i\leq n)$$$.

After printing a line, do not forget to flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  • fflush(stdout) or cout.flush() in C++;
  • System.out.flush() in Java;
  • stdout.flush() in Python;

You will get Wrong answer if you ask more than $$$10$$$ questions.

ExampleInput
4

1 3

2 3
Output

2 1 2

2 1 3

! 3 1 2 4

加入题单

上一题 下一题 算法标签: