P15509 [CEOI 2014] Carnival

Description

Each of Peter’s $N$ friends (numbered from $1$ to $N$) bought exactly one carnival costume in order to wear it at this year’s carnival parties. There are $C$ different kinds of costumes, numbered from $1$ to $C$. Some of Peter’s friends, however, might have bought the same kind of costume. Peter would like to know which of his friends bought the same costume. For this purpose, he organizes some parties, to each of which he invites some of his friends. Peter knows that on the morning after each party he will not be able to recall which costumes he will have seen the night before, but only how many different kinds of costumes he will have seen at the party. Peter wonders if he can nevertheless choose the guests of each party such that he will know in the end, which of his friends had the same kind of costume. Help Peter! ### Interaction Your program must interact with the grader via standard input and output. First, your program must read a line that contains the number $N$ of friends. Then, your program should interact with the grader as follows: To specify a party, it outputs a single line; this line contains the number $k$ of people to invite ($1 \leq k \leq N$), followed by a list of the numbers of people to invite to this party (see example). Don’t forget to flush the output (for example, using `fflush(stdout);` or `cout

Input Format

N/A

Output Format

N/A

Explanation/Hint

### Sample 1 The first example is about $5$ friends with costume numbers $1$ $2$ $1$ $3$ $2$. In the example interaction, the lines beginning with **grader** describe the input read by a solution program. The lines beginning with **program** describe the output of the solution program. The parties specified in the first example do not suffice to safely determine the costume assignment, of course – the solution program was just lucky to guess correctly. ### Sample 2 The second example is about $3$ friends with costume numbers $1$ $2$ $1$, and it is sufficient to specify these two parties to determine the costume assignment. ### Constraints and grading We always have $2 \leq N \leq 150$. If your program needs to specify $P$ parties to determine the costume assignment for a test case, it will score - $0$ points if $11\,500 < P$, - $20\%$ of all points if $3\,500 < P \leq 11\,500$ and - all points if $P \leq 3\,500$.