input() S = str(input()).split() T = str(input()).split() for i in range(len(S)): if S[i] != T[i]: print(i+1) print(S[i]) print(T[i])