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

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
import math

def bin(l,r,ll,val):
	if(l>r):
		return -1
	else:
		mid=(l+r)//2
		if(ll[mid]==val):
			return mid;
		elif(ll[mid]>val):
			return bin(l,mid-1,ll,val)
		else:
			return bin(mid+1,r,ll,val)

def SieveOfEratosthenes(n): 
      
    # Create a boolean array "prime[0..n]" and initialize 
    #  all entries it as true. A value in prime[i] will 
    # finally be false if i is Not a prime, else true. 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
          
        # If prime[p] is not changed, then it is a prime 
        if (prime[p] == True): 
              
            # Update all multiples of p 
            for i in range(p * p, n+1, p): 
                prime[i] = False
        p += 1
    return prime
if __name__ == '__main__':
	n=int(input())
	l=list(map(int,input().split(" ")))
	l.sort()
	l1=list(map(int,input().split(" ")))
	l2=list(map(int,input().split(" ")))
	l2.sort()
	ll=[]
	i1=0
	i2=0
	while(i1<len(l) and i2<len(l2)):
		if(l[i1]==l2[i2]):
			i1=i1+1
			i2=i2+1
		else:
			ll.append(l[i1])
			i1=i1+1
	while(i1<len(l)):
		ll.append(l[i1])
		i1=i1+1
	ll.sort()
	print(ll[0])
	print(ll[1])
