A and B and Compilation Errors

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, ..., a__n (1 ≤ a__i ≤ 109) — the errors the compiler displayed for the first time.

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

ExamplesInput

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

这一题用异或~~

#include<iostream>
using namespace std;
typedef long long ll;
int a[1234];
int main(){
    ios::sync_with_stdio(0);
    int n;
    while(cin >> n){
        int x,y;
        x = y = 0;
        int n1,n2;
        n1 = n-1;
        n2 = n-2;
        int a;
        while(n--){
            cin >> a;
            x ^= a; 
        }
        while(n1--){
            cin >> a;
            x ^= a;
            y ^= a;
        }

        while(n2--){
            cin >> a;
            y ^= a;
        }
        cout << x << '\n';
        cout << y << '\n';
    }
    return 0;
}

水果

夏天来了好开心啊,呵呵,好多好多水果
Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了.
Input
第一行正整数N(0<N<=10)表示有N组测试数据.
每组测试数据的第一行是一个整数M(0<M<=100),表示工有M次成功的交易.其后有M行数据,每行表示一次交易,由水果名称(小写字母组成,长度不超过80),水果产地(小写字母组成,长度不超过80)和交易的水果数目(正整数,不超过100)组成.
Output
对于每一组测试数据,请你输出一份排版格式正确(请分析样本输出)的水果销售情况明细表.这份明细表包括所有水果的产地,名称和销售数目的信息.水果先按产地分类,产地按字母顺序排列;同一产地的水果按照名称排序,名称按字母顺序排序.
两组测试数据之间有一个空行.最后一组测试数据之后没有空行.
Sample Input

1
5
apple shandong 3
pineapple guangdong 1
sugarcane guangdong 1
pineapple guangdong 3
pineapple guangdong 1

Sample Output

guangdong
   |----pineapple(5)
   |----sugarcane(1)
shandong
   |----apple(3)

两个map~

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
struct node{
    map<string,int> m;
}r;
int main(){
    int n,t;
    cin >> t;
    while(t--){
        map<string,node> ma;
        cin >> n;
        while(n--){
            string a,b;
            int c;
            cin >> a >> b >> c;
            ma[b].m[a] += c;
        }
        map<string,node>::iterator it;
        map<string,int>::iterator iit;
        for(it = ma.begin();it != ma.end(); it++){
            cout << it -> first << '\n';
            for(iit = (it->second).m.begin(); iit != (it->second).m.end(); iit++){
                cout << "   |----" << iit -> first << "(" << iit ->second << ")\n";
            }
        }
        if(t != 0) cout << '\n';
    }
    return 0;
}