P18341 [CodeChef] ITGUY08
普及
题目描述

Chef has three baskets and two of them have multiple balls(Natural numbers written on them). The first basket has N balls, the second basket has M balls and the third basket is empty. Chef starts choosing all the unique balls(only occurring once in both the baskets) and puts into the third basket and throw the repetitive ones. Print numbers on the balls of the third basket in ascending order.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow.
- Each testcase contains three lines of input.
- First-line has two integers $N, M$.
- Second-line with N space-separated numbers.
- Third-line with M space-separated numbers.

-----Output:-----
For each testcase, output in a single line answer.

-----Constraints-----
- $1 \leq T \leq 10$
- $1 \leq N \leq 10^5$
- $1 \leq M \leq 10^5$

-----Sample Input:-----
1
4 5
1 2 3 4
2 3 4 5 6

-----Sample Output:-----
1 5 6

输入格式

见题面

输出格式

见题面

样例输入
['1', '4 5', '1 2 3 4', '2 3 4 5 6']
样例输出
['1 5 6']