def solve(n, a_line, b_line) a_colors = a_line.split b_colors = b_line.split (0...n).each do |i| return a_colors[i] unless a_colors[i] == b_colors[i] end end n = gets.to_i a_line = gets.chomp b_line = gets.chomp puts solve(n, a_line, b_line)