{-# 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

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 = count [s..e] c
  where
    c = foldr f IntMap.empty as
    f :: Int -> IntMap.IntMap Int -> IntMap.IntMap Int
    f k dic = IntMap.insertWith (+) k 1 dic

    count :: [Int] -> IntMap.IntMap Int -> [Int]
    count [] dic = []
    count (i:is) dic = let v = IntMap.lookup i dic
                       in if isNothing v
                       then count is dic
                       else (replicate (fromJust v) i) ++ (count is dic)
