from collections import defaultdict dic=defaultdict(int) dic2=defaultdict(int) n=int(input()) a=list(input().split()) b=list(input().split()) sa=set(a) sb=set(b) if len(sa)==len(sb): for i in a: dic[i]+=1 for i in b: dic2[i]+=1 for i in sa: if dic[i] != dic2[i]: print(i) break elif len(sa)>len(sb): t=sa-sb print(list(t)[0]) elif len(sa)