n = gets.chomp.to_i
d = gets.split.map(&:to_i).sort
half = d.inject(:+) / n

low = d.count { |num| half < num}
high = d.count { |num| half >= num}

if low != high || half.odd?
  puts 0
  exit
end

(1..(n-1)).each do |i|
  puts d[i] - d[i - 1] if half > d[i-1] && half < d[i]
end
