n = gets.to_i s = gets.chomp.split t = gets.chomp.split for i in 0 ... n if s[i] != t[i] puts i + 1 puts s[i] puts t[i] exit 0 end end