import           Control.Applicative
import           Control.Monad
import           Debug.Trace

import           Control.Monad.ST
import           Data.Array.MArray
import           Data.Array.IO
import           Data.Array.Unboxed
import           Data.Foldable       (toList)

_VMAX = 10000

countingSort :: Int -> [Int] -> IO ()
countingSort n as = do
    c <- newArray (0, _VMAX) 0 :: IO (IOUArray Int Int)
    b <- newArray (0, _VMAX) 0 :: IO (IOUArray Int Int)

    forM_ as $ \a -> do
        t <- readArray c a
        writeArray c a (t+1)

    forM_ [1.._VMAX] $ \i -> do
        e1 <- readArray c i
        e2 <- readArray c (i-1)
        writeArray c i (e1 + e2)

    forM_ as $ \a -> do
        e <- readArray c a
        writeArray b e a
        writeArray c a (e - 1)

    forM_ [1..n] $ \i -> do
        when (i > 1) $ putStr " "
        e <- readArray b i
        putStr $ show e

    putStrLn ""

ex :: [Int]
ex = [2,5,1,3,2,3,0]

main :: IO ()
main = do
    n <- readLn
    xs <- fmap read . words <$> getContents
    countingSort n xs

