Imports System
Imports System.Collections.Generic
class p
    shared sub main()
        dim n = Console.ReadLine().Split()
        dim s = new List(of String)
        for i as Integer = 0 To Integer.Parse(n(0))-1
            s.Add(Console.ReadLine())
        next i
        s.sort()
        for each i As String In s
            Console.Write(i)
        next
    end sub
end class