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