def counting_sort(source)
  source = [nil] + source
  target = [nil]
  counts = []

  1.upto(source.size - 1) do |i|
    value = source[i]
    counts[value] = (counts[value] || 0) + 1
  end

  counts.size.times do |i|
    counts[i] ||= 0
  end

  1.upto(counts.size - 1) do |i|
    counts[i] = counts[i] + counts[i - 1]
  end

  (source.size - 1).downto(1) do |i|
    value = source[i]
    pos = counts[value]
    target[pos] = value
    counts[value] -= 1
  end

  target[1..-1]
end

if $PROGRAM_NAME == __FILE__
  n = gets.to_i

  source = gets.split.map(&:to_i)

  puts counting_sort(source).join(' ')
end