시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB108443547.945%

문제

Let a $k$-combination out of $n$ be a $k$-element subset of the $n$-element set $\{1, 2, \ldots, n\}$. To denote a combination, list its elements in ascending order. For example, $2$-combinations out of $3$ look as follows: $\{1, 2\}$, $\{1, 3\}$, $\{2, 3\}$.

Let a combination be even if the number of its elements is an even number, and odd otherwise. For a fixed $n > 0$, consider two sets: $A_n$, the set of all even combinations out of $n$, and $B_n$, the set of all odd combinations out of $n$. It can be shown that $A_n$ and $B_n$ contain the same number of combinations.

For each $n = 1, 2, \ldots, 50$, your task is as follows. Construct any bijection (a one-to-one correspondence) between the sets $A_n$ and $B_n$. After that, given an element of one of these sets, print the corresponding element of the other set.

인터랙션

To check that you indeed constructed a bijection, in this problem, your solution will be run twice on each test. Each line of input is terminated by an end-of-line character.

첫 번째 실행

During the first run, the first line contains an integer $t$, the number of test cases ($1 \le t \le 1000$). Then follow their descriptions.

Each test case denotes a combination and is given on two input lines. The first of these lines contains two space-separated integers $n$ and $k$ ($1 \le n \le 50$, $0 \le k \le n$). The second one contains $k$ space-separated integers $a_1, a_2, \ldots, a_k$, the elements of the combination ($1 \le a_1 < a_2 < \ldots < a_k \le n$). If $k = 0$, the second line is empty.

For each test case, print the corresponding combination from the other set. Output format for combinations is exactly the same as input format. The printed combination must have the same $n$ as the given one, and $k$ must have different parity. There are no other restrictions on the correspondence.

두 번째 실행

During the second run, the input format is exactly the same as during the first run. However, in each test case, the given combination is not the initial one, but instead the one printed during the first run.

For each test case, as during the first run, print the corresponding combination from the other set. Output format for combinations is exactly the same as input format. As the correspondence must be a bijection, the combination printed during the second run must be the same as the one given during the first run. This is what the jury program will check.

예제

For each test, the input during the second run depends on the solution's output during the first run.

Below we show two runs of a certain solution on the first test.

예제 입력 1

6
3 0

2 1
1
3 3
1 2 3
3 1
1
3 1
2
3 1
3

예제 출력 1

3 3
1 2 3
2 2
1 2
3 0

3 2
2 3
3 2
1 3
3 2
1 2

예제 입력 2

6
3 3
1 2 3
2 2
1 2
3 0

3 2
2 3
3 2
1 3
3 2
1 2

예제 출력 2

3 0

2 1
1
3 3
1 2 3
3 1
1
3 1
2
3 1
3

채점 및 기타 정보

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