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