n = gets.to_i
a = gets.split.map(&:to_i)

def counting_sort(a, k)
  c = Array.new(k+1){0}
  b = Array.new(a.length)

  a.each do |item|
    c[item]+=1
  end

  b = c.each_with_index.inject([]) do |memo, (item, i)|
    item.times {memo << i}
    memo
  end

  return b
end

puts counting_sort(a, 10000).join(" ")
