n=gets.to_i a=gets.split(" ") b=gets.split(" ") b.each_with_index do |s, i| if s != a[i] puts i + 1 puts a[i] puts s exit end end