import           Control.Monad
import qualified Data.ByteString.Char8 as BS
import           Data.Foldable
import           Data.Maybe
import qualified Data.Sequence         as Seq

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
  [n, l] <- getIntList
  t <- replicateM n BS.getLine
  let s = Seq.unstableSort $ Seq.fromList t
      ans = BS.concat $ toList s
  BS.putStrLn ans