시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
3 초 512 MB 4 3 3 75.000%

문제

This is an interactive problem.

Jury has prepared n non-empty integer arrays a1, a2, . . . , an. Each array consists of at most 10 positive integers not exceeding 1000. The elements of each array are pairwise distinct.

You can make queries of the following kind: choose several indices q1, q2, . . . , qm, where 1 ≤ m ≤ n and 1 ≤ qi ≤ n. These indices do not have to be distinct. The testing system tells you the contents of arrays aq1, aq2, . . . , aqm in the same order. However, these contents are concatenated without any delimeters.

Your task is to find the contents of all n arrays.

프로토콜

First, the testing system writes the integer n — the number of arrays (1 ≤ n ≤ 1000). Your solution shall print requests of two types:

  • “? m q1 q2 . . . qm” corresponds to a query about the contents of arrays aq1, aq2, . . . , aqm. The testing system responds with the total length of these arrays, followed by the contents of array aq1, followed by the contents of array aq2, . . ., followed by the contents of array aqm.
  • “! k1 a1,1 . . . a1,k1 . . . kn an,1 . . . an,kn ” tells that your program has determined the contents of all the arrays, where ki is the length of array ai . The request is formed by the length of array a1, followed by the contents of array a1, followed by the length of array a2, followed by the contents of array a2, . . ., followed by the length of array an, followed by the contents of array an.

Don’t forget to flush the output after each request!

Your solution must issue exactly one request of the second type. It must be the last request, and the solution must terminate gracefully after issuing it.

Your solution is allowed to issue at most 20 requests of the first type.

예제 입력 1

3

5 1 1 2 2 1

4 1 2 1 1

2 1 2

예제 출력 1


? 3 1 2 3

? 3 1 3 1

? 1 2

! 1 1 2 1 2 2 2 1

채점

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