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