n=int(input());c=0 s=[*input().split()] t=[*input().split()] for x,y in zip(s,t): c+=1 if x!=y: print(c) print(x) print(y)