{-# 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 Control.Monad.ST
import Data.Array.ST
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Mutable as VM


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

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

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

    c :: V.Vector Int
    c = V.create $ do
      vec <- VM.replicate (e - s + 1) (0 :: Int)
      let f k = VM.unsafeModify vec (+1) (k - s)
      forM_ as f
      return vec

