import sys readline=sys.stdin.readline write=sys.stdout.write N=int(readline()) A=readline().split() B=readline().split() A.sort() B.sort() B+=[None] for a,b in zip(A,B): if a!=b: ans=a break print(ans)