{-# 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 Data.Array.ST

main :: IO ()
main = do
  n <- readLn :: IO Int
  as <- fmap (map read . words) getLine :: IO [Int]
  putStrLn . unwords . map show $ solve as
  -- print $ solve as

solve as = countingSort'' bounds as
  where
    bounds = (0, 2000000)


countingSort'' :: (Int, Int) -> [Int] -> [Int]
countingSort'' (s,e) as = join $ foldr g [] [s..e]
  where
    g :: Int -> [[Int]]-> [[Int]]
    g i acc = (replicate (carr ! i) i):acc

    carr :: UArray Int Int
    carr = runSTUArray $ do
      arr <- newArray (s,e) 0
      let f k = do
            val <- readArray arr k
            writeArray arr k (val + 1) 
      forM_ as f
      return arr

