n = int(input()) lst1=list(input().split()) lst2=list(input().split()) for j in range(n): if lst1[j] != lst2[j]: print(j+1) print(lst1[j]) print(lst2[j])