import           Control.Monad
import           Data.List
import 			 Data.Functor

main :: IO ()
main = do
  [n, l] <- map read . words <$> getLine
  s      <- replicateM n getLine
  putStrLn $ concat (sort s)