시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB5610716.667%

문제

Pak Dengklek is organizing a party at his place. This party is attended by $N + M$ guests, numbered $1$ to $N + M$. The guests numbered $1$ to $N$ are male guests, while the guests numbered $N + 1$ to $N + M$ are female guests.

Each guest gets acquainted with zero or more other guests that have the opposite gender. If the guest $x$ gets acquainted with guest $y$, then guest $y$ also gets acquainted with guest $x$. Since the duration of the party is quite short, usually each guest gets acquainted by exactly one other guest. A guest is said to be unusual if the guest does not get acquainted with other guests or gets acquainted with more than one other guests.

After checking the guest list, Pak Dengklek notices that the number of male guests is not the same as the number of female guests. Therefore, there must be at least one unusual guest. You want to help Pak Dengklek to identify any unusual guest.

You can ask at most $7$ questions to Pak Dengklek. For each question, you can ask a set of guests. Pak Dengklek will answer the set of guests that get acquainted with at least one guest in the set. In other words, if you ask a set of guests $A$, then a guest $y$ will be in the set answered by Pak Dengklek if and only if there is a guest $x$ in the set $A$ and guest $x$ gets acquainted with guest $y$.

인터랙션

In the beginning, the values of $N$ and $M$ will be given from standard input in the following format: $N$ $M$ ($1 ≤ N, M ≤ 50$; $N \ne M$). Then, not more than $7$ times, you can output to standard output in the following format: ? $X$ $A_1$ $A_2$ $\dots$ $A_X$. This means you ask the set of guests $\{A_1, A_2, \dots , A_X\}$ to Pak Dengklek. The values of $A_1, A_2, \dots , A_X$ asked have to satisfy $1 ≤ A[1] < A[2] < \cdots < A[X] ≤ N +M$. The set $B = \{B_1, B_2, \dots , B_Y\}$ (the set answered by Pak Dengklek) will be given from standard input in the following format: $Y$ $B_1$ $B_2$ $\dots$ $B_Y$. The values of $B_1, B_2, \dots , B_Y$ are guaranteed to satisfy $1 ≤ B[1] < B[2] < \cdots < B[Y ] ≤ N + M$. It is also guaranteed that each guest gets acquainted only with guests that have the opposite gender. In the end, your answer has to be outputted to standard output in the following format: ! $Z$. This means you guess that the guest $Z$ is an unusual guest. Your answer will be considered as correct if the guest $Z$ does not get acquainted with other guests or gets acquainted with more than one other guests.

Do not forget to flush output buffers after each write.

  • In C you can use fflush(stdout).
  • In C++ you can use fflush(stdout) for stdio.h (cstdio) library or cout << flush for iostream library.
  • In Java you can use method flush for output stream, for example, System.out.flush().
  • In Python you can use stdout.flush().

예제 입력 1

3 5

7 1 2 3 4 5 6 8

4 4 5 6 8

3 1 2 3

2 1 4

예제 출력 1


? 8 1 2 3 4 5 6 7 8

? 3 1 2 3

? 5 4 5 6 7 8

? 2 1 4

! 7

In the following sample, $N = 3$, $M = 5$, and:

  • The first guest gets acquainted with the fourth guest.
  • The second guest gets acquainted with the fifth, sixth, and eighth guests.
  • The third guest gets acquainted with the sixth guest.
  • The fourth guest gets acquainted with the first guest.
  • The fifth guest gets acquainted with the second guest.
  • The sixth guest gets acquainted with the second and third guests.
  • The seventh guest does not get acquainted with other guests.
  • The eighth guest gets acquainted with the second guest.

Also note that “! $2$” or “! $6$” in the last line is also a correct output.

채점 및 기타 정보

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