N = int(input()) A = list((map(str, input().split()))) B = list((map(str, input().split()))) from collections import Counter a_cnt = Counter(A) b_cnt = Counter(B) for key in a_cnt.keys(): if a_cnt[key]!=b_cnt[key]: print(key) break