#input n = int(input()) #文字数 S = input().split() T = input().split() # judge for i in range(n): if S[i] != T[i]: print(i+1) print(S[i]) print(T[i]) break