N = int(input()) sent1 = input().split() sent2 = input().split() diff = {} for i in range(N): if sent1[i] != sent2[i]: print(str(i) + '\n' + sent1[i] + '\n' + sent2[i])