n = int(input()) list1 = input().split() list2 = input().split() for i in range(n): if list1[i] != list2[i]: print(i) print(list1[i]) print(list2[i])