N = int(input()) S = list(input().split()) T = list(input().split()) for a, (b, c) in enumerate(zip(S, T)): if b != c: print(a + 1) print(b) print(c)