{-# LANGUAGE BangPatterns #-}
import Control.Monad
import Data.Maybe
import Debug.Trace
import Data.List
import qualified Data.Map.Strict as Map
import qualified Data.IntMap.Strict as IntMap
import qualified Data.Set as Set
import qualified Data.IntSet as IntSet
import Data.Functor
-- import Data.Array
import Data.Array.Unboxed

import Control.Monad.ST
import Data.Array.ST
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as VU
-- import qualified Data.Vector.Unboxed.Mutable as VM
import qualified Data.Vector.Mutable as VM

import Data.Array.IO
import Data.Array.ST

import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
readInt = fst . fromJust . B.readInt
readInts = map (fst . fromJust . B.readInt) . B.words <$> B.getLine :: IO [Int]
read2dInts = map (map (fst . fromJust . B.readInt) . B.words) . B.lines <$> B.getContents

main :: IO ()
main = do
  n <- readLn :: IO Int
  as <- readInts
  putStrLn . unwords . map show $ solve as

solve = countingSort'' (0, 10000)

countingSort'' :: (Int, Int) -> [Int] -> [Int]
countingSort'' (s,e) as = concatMap (\i -> replicate (carr ! i) i) [0..(e-s)]
  where
    carr :: UArray Int Int
    carr = runSTUArray $ do
      arr <- newArray (s,e) 0
      forM_ as (\a -> do
        val <- readArray arr a
        writeArray arr a (val + 1) 
        )
      return arr

