n = int(input()) a = [x for x in input().split()] b = [x for x in input().split()] for i in range(n): if a[i] != b[i]: print(i+1) print(a[i]) print(b[i])