N = int(input()) A = input().split(' ') B = input().split(' ') acnt = {} for a in A: acnt[a] = acnt.get(a, 0) + 1 bcnt = {} for b in B: bcnt[b] = bcnt.get(b, 0) + 1 for k, v in acnt.items(): if bcnt.get(k, 0) != v: print(k) break