n=gets.to_i s=gets.chomp.split t=gets.chomp.split p s[0]==t[0] n.times do |i| if s[i]!=t[i] puts i+1 puts s[i] puts t[i] exit 0 end end