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

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

_VMAX = 10000

countingSort :: [Int] -> [Int]
countingSort as = tail . take (length as + 1) . elems $ runSTUArray $ do
    c <- newArray (0, _VMAX) 0 :: ST s (STUArray s Int Int)
    b <- newArray (0, _VMAX) 0 :: ST s (STUArray s Int Int)

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

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

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

    return b

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

main :: IO ()
main = do
    getLine
    xs <- fmap read . words <$> getLine
    let as = countingSort xs
    putStrLn . unwords $ fmap show as

