Processing math: 100%

Time Limit : sec, Memory Limit : KB
English / Japanese  

Set Union

Find the union of two sets A={a0,a1,...,an1} and B={b0,b1,...,bm1}.

Input

The input is given in the following format.

n
a0a1...an1
m
b0b1...bm1

Elements of A and B are given in ascending order respectively. There are no duplicate elements in each set.

Output

Print elements in the union in ascending order. Print an element in a line.

Constraints

  • 1n,m200,000
  • 0a0<a1<...<an1109
  • 0b0<b1<...<bm1109

Sample Input 1

3
1 5 8
2
5 9

Sample Output 1

1
5
8
9

 
BESsBESsBESsBESsBESsBESsBESsBESs