import Data.List (sort)

main :: IO ()
main = do
    let
        readInt = read :: String -> Int
        
    n <- fmap (readInt . (!! 0) . words) getLine
    ls <- sequence $ replicate n getLine
    putStrLn $ concat . sort $ ls