import Control.Monad
import Data.List

main = putStrLn . solve =<< parse

solve :: [String] -> String
solve = concat . sort

parse :: IO [String]
parse = do
    [n, l] <- map read . words <$> getLine
    replicateM n getLine
