问题2507--{A} + {B}

2507: {A} + {B}

[命题人 : ]
时间限制 : 2.000 sec  内存限制 : 64 MB

题目描述

Given Two collections {A} and {B}. Note: there are no two same elements in each collections.

输入

The problem has many test cases. For each case,there are three lines. The first line contains two integer n and m (0 < n,m <= 10000). n is the number of {A}'s elements, and m is the number of {B}'s elements. The second line is the elements of {A}. The third line is the elements of {B}.

输出

For each case, output one line containing all the elements in the combination of collections {A} and {B}. You should order the elements by ascend(from small one to big one).

样例输入 Copy

1 2
1
2 3
1 2
1
1 2

样例输出 Copy

1 2 3
1 2