N = int(input()) S = input().split() T = input().split() for s,t in zip(S, T): if s != t: break print(s) print(t)