Codeforces Round 294 (Div. 2)
B
A and B and Compilation Errors
Codeforces
1100
原题
← AC →
翻译中…

A and B are preparing themselves for programming contests.

翻译中…

B loves to debug his code. But before he runs the solution and starts debugging, he has to first compile the code.

翻译中…

Initially, the compiler displayed $*n*$ compilation errors, each of them is represented as a positive integer. After some effort, B managed to fix some mistake and then another one mistake.

翻译中…

However, despite the fact that B is sure that he corrected the two errors, he can not understand exactly what compilation errors disappeared — the compiler of the language which B uses shows errors in the new order every time! B is sure that unlike many other programming languages, compilation errors for his programming language do not depend on each other, that is, if you correct one error, the set of other error does not change.

翻译中…

Can you help B find out exactly what two errors he corrected?

翻译中…

Input

翻译中…

The first line of the input contains integer $*n*$ ($3 ≤ *n* ≤ 10^{5}$) — the initial number of compilation errors.

翻译中…

The second line contains $*n*$ space-separated integers $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$ ($1 ≤ *a*_{*i*} ≤ 10^{9}$) — the errors the compiler displayed for the first time.

翻译中…

The third line contains $*n* - 1$ space-separated integers $*b*_{1}, *b*_{2}, ..., *b*_{*n* - 1}$ — the errors displayed at the second compilation. It is guaranteed that the sequence in the third line contains all numbers of the second string except for exactly one.

翻译中…

The fourth line contains $*n* - 2$ space-separated integers $*с*_{1}, *с*_{2}, ..., *с*_{*n* - 2}$ — the errors displayed at the third compilation. It is guaranteed that the sequence in the fourth line contains all numbers of the third line except for exactly one.

翻译中…

Output

翻译中…

Print two numbers on a single line: the numbers of the compilation errors that disappeared after B made the first and the second correction, respectively.

翻译中…

Note

翻译中…

In the first test sample B first corrects the error number 8, then the error number 123.

翻译中…

In the second test sample B first corrects the error number 1, then the error number 3. Note that if there are multiple errors with the same number, B can correct only one of them in one step.

翻译中…

样例

Input #1
5
1 5 8 123 7
123 7 5 1
5 1 7
Output #1
8
123
InputCopy OutputCopy
Input #2
6
1 4 3 3 5 7
3 7 5 4 3
4 3 7 5
Output #2
1
3
InputCopy OutputCopy
题目信息
题号
519B
时间限制
2 s
内存限制
256 MB
标签
数据结构
模拟
排序

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。