def CountingSort(arrA,arrB,k)
  arrC=Array.new()
  0.upto(k) do |i|
    arrC[i]=0
  end
  1.upto(@n) do |j|
    arrC[arrA[j]]+=1
  end
  1.upto(k) do |i|
    arrC[i]=arrC[i]+arrC[i-1]
  end
  @n.downto(1) do |j|
    arrB[arrC[arrA[j]]]=arrA[j]
    arrC[arrA[j]]-=1
  end
end
@n=gets.to_i
arr=gets.split.map(&:to_i)
arr.unshift(0)
res=Array.new()
CountingSort(arr,res,10001)
res.shift
puts res.join(' ')