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