N = gets.to_i A = gets.chomp.split.tally B = gets.chomp.split.tally B.default = 0 A.each do |key, val| if B[key] != val puts key end end