N = int(input()) A = input().split() B = input().split() da = dict() db = dict() for a in A: if a in da: da[a] += 1 else: da[a] = 1 for b in B: if b in db: db[b] += 1 else: db[b] = 1 import sys for k in da: if k not in db: print(k) exit() if da[k] > db[k]: print(k) exit()