# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

## Set Union

Limits: 1s, 512 MB

Given two sets of integers, print the set containing the union of the two input sets.

For example, given the sets:

- {1, 3, 5, 7, 8}
- {2, 3, 4, 7, 9}

The union of the two sets is:

- {1, 2, 3, 4, 5, 7, 8, 9}

You can learn more about set union here.

#### Input

The first line of the input will contain two integers **N** and **M** (0 < N, M < 100).

The following line will contain N integers, the members of the firsts set.

The line after that will contain M integers, the members of the second set.

The members of both sets will be given in increasing order.

#### Output

Print the members of the union set in the same line, separated by space sorted in increasing order.

#### Samples

Input | Output |
---|---|

5 5 1 3 5 7 8 2 3 4 7 9 | 1 2 3 4 5 7 8 9 |

Login to submit