Memory training
Vasyl and Petro are training their memories. To do this, they take an array with elements and perform the following actions:
First, Vasyl takes any number from the array, and names all other elements of the array at random.
Then Petro takes any number from the array named by Vasyl, and names all other elements of that array at random.
Then Vasyl performs his turn again.
Then Petro performs his turn.
And so on.
Obviously, after moves, all elements of the array will be distributed between Vasyl and Petro.
Let's take a look at an example of how memory training works. Let the initial array be .
Vasyl makes the first move: . He took number and named all other elements of the array at random.
Then Petro names this array: . He took number for himself.
Vasyl names this array: . He took number for himself.
Petro names this array: . He took number for himself.
Vasyl names this array: . He took number for himself.
Petro takes the last number, for himself.
Thus, Vasyl received the numbers , and Petro received the numbers .
Write a program that, given an input array and the sequence of actions, determines who got which elements.
Input
The first line contains a single integer () — the number of elements in the array.
The second line contains integers ().
Each of the following lines contains an array, which was named by either Vasyl or Petro. It is guaranteed that the arrays are correct, that is, each of them can be obtained from the previous one.
Output
In the first line, output the elements that Vasyl took in non-descending order.
In the second line, output the elements that Petro took in non-descending order.
Examples
Scoring
In this problem, each test is evaluated separately. However, further:
In 22% of the tests, each integer from to occurs exactly once in the initial array .
In 35% of the tests, .