N = gets.to_i S = gets.split T = gets.split S.zip(T).each.with_index do |(s, t), i| next if s == t puts i + 1 puts s puts t exit end