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

def countingSort(aAry, bAry, k)
    # puts "aAry = #{aAry}, bAry = #{bAry}, k = #{k}"
    n = aAry.size
    cAry = Array.new(k + 1, 0)
    # puts "n = #{n}, cAry = #{cAry}"
    aAry.each { |a| cAry[a] += 1 }
    1.upto(k) { |i| cAry[i] = cAry[i] + cAry[i - 1] }
    (n - 1).downto(0) do |j|
        bAry[cAry[aAry[j]]] = aAry[j]
        cAry[aAry[j]] -= 1
    end
end

bAry = []
countingSort(ary, bAry, ary.max)
bAry.shift
puts bAry.join(' ')
