module Main
where

import           Control.Monad
import           Control.Monad.ST
import           Data.Array.IArray
import           Data.Bits
import           Data.List
import qualified Data.Vector         as V
import qualified Data.Vector.Mutable as VM

marge :: Ord a => VM.STVector s a -> VM.STVector s a -> VM.STVector s a -> ST s ()
marge u v ret
  | VM.null u = VM.copy ret v
  | VM.null v = VM.copy ret u
  | otherwise = do
        x <- VM.read u 0
        y <- VM.read v 0
        if x > y then marge v u ret else do
            VM.write ret 0 x
            marge (VM.tail u) v (VM.tail ret)

msort :: Ord a => V.Vector a -> V.Vector a
msort v = runST $ do
    v' <- V.thaw v
    work <- VM.new $ VM.length v'
    msort_ v' work
    V.unsafeFreeze v'

msort_ :: Ord a => VM.STVector s a -> VM.STVector s a -> ST s ()
msort_ v work
  | VM.length v <= 1 = return ()
  | otherwise        = do
        VM.copy lwork lv
        VM.copy rwork rv
        msort_ lwork lv
        msort_ rwork rv
        marge lwork rwork v
        where
            toHalf vm = VM.splitAt (VM.length vm `div` 2) vm
            (lv, rv) = toHalf v
            (lwork, rwork) = toHalf work

main :: IO ()
main = do
    res <- V.toList . msort . V.fromList . (map (read :: String -> Int) . words) <$> getLine
    putStrLn $ (show $ head res) ++ (concat $ (map (" " ++)) . (map show) $ tail res)
    print 0
