n = gets.to_i a = gets.chomp.split b = gets.chomp.split n.times do |i| if a[i] != b[i] p i + 1 puts a[i] puts b[i] end end