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 ≤ 105) — the initial number of compilation errors.

The second line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 109) — the errors the compiler displayed for the first time.

The third line contains n - 1 space-separated integers b1, b2, ..., bn - 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.

Examples
input
5
1 5 8 123 7
123 7 5 1
5 1 7
output
8
123
input
6
1 4 3 3 5 7
3 7 5 4 3
4 3 7 5
output
1
3
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.

 #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <vector>
using namespace std;
#define N 100005
int a[N],b[N],c[N];
int main()
{
int n;
while(cin>>n){
for(int i=;i<n;i++)
cin>>a[i];
for(int i=;i<n-;i++)
cin>>b[i];
for(int i=;i<n-;i++)
cin>>c[i];
sort(a,a+n);
sort(b,b+n-);
sort(c,c+n-);
for(int i=;i<n;i++)
if(a[i]!=b[i]){
cout<<a[i]<<endl;
break;
}
for(int i=;i<n-;i++)
if(c[i]!=b[i]){
cout<<b[i]<<endl;
break;
}
}
return ;
}

最新文章

  1. 初探Vue
  2. 使用ROW_NUMBER()+临时表+While 实现表遍历
  3. 表单验证&lt;AngularJs&gt;
  4. 罗技 UE3100 蓝牙耳机使用
  5. Live2d-cocos2dx教程(一)例子搭建及运行
  6. jQuery_02之元素操作及事件绑定
  7. GS界面上显示的重要参考数据
  8. bzoj 3620 似乎在梦中见过的样子(KMP)
  9. VMware SphereESXi上传系统镜像
  10. 【Unity3d游戏开发】浅谈UGUI中的Canvas以及三种画布渲染模式
  11. phtread_mutex 组合
  12. 使用olami sdk实现一个语音查询股票的iOS程序
  13. 学习python第二天
  14. django的templatetags
  15. c++11 线程池学习笔记 (二) 线程池
  16. docker 技术
  17. [No000015D]【李笑来 笔记整理】个人商业模式升级
  18. System.Data.SQLite安装的相关问题
  19. 玩转mongodb(一):初识mongodb
  20. java web 解决Form表单乱码问题

热门文章

  1. Java自学-多线程 同步synchronized
  2. idea生成构造方法的快捷键(看这篇就够了)
  3. IIS6的文件解析漏洞
  4. shell 一键配置单实例oracle基础环境变量(linux7)
  5. 剑指offer-面试题58_2-左旋转字符串-字符串
  6. JaveScript遍历数组的方法
  7. C# MVC Api无法获得参数
  8. 安装JumpServer到CentOS(YUM)
  9. P1525 关押罪犯【二分+二分图】
  10. IntelliJ IDEA搭建一个简单的springboot项目