import Control.Applicative
import Data.List
import Control.Monad
strToInt s = (read :: String -> Int) s

main :: IO ()
main = do
    -- 整数の入力
    [n, l] <- map strToInt . words <$> getLine
    -- 文字列の入力
    cs <- replicateM n getLine
    -- 出力
    putStrLn . concat $ sort cs
