from collections import Counter n = int(input()) a = input().split() b = input().split() ca, cb = Counter(a), Counter(b) for k, v in ca.items(): if v - cb[k] == 1: exit(print(k))