n=int(input()) s=input().split() t=input().split() for i in range(n-1): if s[i]!=t[i]:print(s[i]);exit() print(s[-1])