n = int(input()) A = list(map(str, input().split())) B = list(map(str, input().split())) from collections import Counter CA = Counter(A) CB = Counter(B) for k, v in CA.items(): if k not in CB: print(k) exit() else: if CB[k] != v: print(k) exit()