#t87. 大家都来找不同

大家都来找不同

Finding the Differences

Problem Description

Dazhi encountered a problem in a book he bought:

Given two non-negative integer arrays AA and BB, remove the numbers that appear in both AA and BB, and output the numbers unique to each array. Output the remaining numbers of AA first (in their original input order), then those of BB (in their original input order).

He now wants to challenge you. Can you solve it?

Input Format

There are three lines in total. The first line contains two integers n,mn, m, the numbers of elements in arrays AA and BB (1≤n,m≤1001 \le n, m \le 100).

The second line contains nn non-negative integers, the array AA. A number may appear multiple times. Each number does not exceed 10510^5.

The third line contains mm non-negative integers, the array BB. A number may appear multiple times. Each number does not exceed 10510^5.

The input guarantees that AA and BB always have some different numbers.

Output Format

One line: first output the remaining numbers of array AA, then the remaining numbers of array BB.

Sample Input

4 4
1 5 4 1
2 8 1 6

Sample Output

5 4 2 8 6