a=int(input()) b=input().split() c=input().split() for i,j in enumerate(b): if j not in c: print(i) print(j) for i in c: if i not in b: print(i)