import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    [n, _] <- fmap read . words <$> getLine :: IO [Int]
    ss <- fmap sort $ replicateM n getLine
    let ans = concat ss
    putStrLn ans