n=gets.to_i x=gets.split y=gets.split n.times{|i| if x[i]!=y[i] then puts i+1 puts x[i] puts y[i] break end }