3
1 2 3
3 2
2
 3
84 30 9
9 84
9
 4
1 5 7 8
1 5 7
1 5
 3
796067435 964699482 819602309
964699482 796067435
964699482
 10
460626451 802090732 277246428 661369649 388684428 784303821 376287098 656422756 9301599 25720377
277246428 388684428 661369649 460626451 656422756 802090732 9301599 784303821 376287098
376287098 802090732 388684428 9301599 656422756 784303821 460626451 277246428
 6
5 4 3 3 5 5
3 5 5 4 3
3 5 4 3
 3
168638990 939116221 323703261
168638990 323703261
168638990
 3
77 77 77
77 77
77
 3
374054998 726316780 902899520
902899520 726316780
726316780

1
3
 30
84
 8
7
 819602309
796067435
 25720377
661369649
 5
5
 939116221
323703261
 77
77
 374054998
902899520

# 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
# inputCopy
# 5
# 1 5 8 123 7
# 123 7 5 1
# 5 1 7
# outputCopy
# 8
# 123
# inputCopy
# 6
# 1 4 3 3 5 7
# 3 7 5 4 3
# 4 3 7 5
# outputCopy
# 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.

n = int(input())
s1 = sum([int(x) for x in input().split()])
s2 = sum([int(x) for x in input().split()])
s3 = sum([int(x) for x in input().split()])
print(s1-s2)
print(s2-s3)
