cnt = gets.chomp.to_i lists_1 = gets.chomp.split(" ") lists_2 = gets.chomp.split(" ") for i in 0...cnt do if lists_1[i] != lists_2[i] printf("#{i + 1}\n#{lists_1[i]}\n#{lists_2[i]}\n") break end end