Problem:
 Score : 200 points    Problem Statement Iroha has a sequence of N strings S_1, S_2, ..., S_N . The length of each string is L .  She will concatenate all of the strings in some order, to produce a long string.  Among all strings that she can produce in this way, find the lexicographically smallest one.  Here, a string s=s_1s_2s_3 ... s_n is lexicographically smaller than another string t=t_1t_2t_3 ... t_m if and only if one of the following holds:  There exists an index i(1≦i≦min(n,m)) , such that s_j = t_j for all indices j(1≦j<i) , and s_i<t_i .  s_i = t_i for all integers i(1≦i≦min(n,m)) , and n<m .       Constraints  1 ≦ N, L ≦ 100  For each i , the length of S_i equals L .  For each i , S_i consists of lowercase letters.         Input The input is given from Standard Input in the following format:  N  L  S_1  S_2 : S_N       Output Print the lexicographically smallest string that Iroha can produce.        Sample Input 1 3 3
dxx
axx
cxx      Sample Output 1 axxcxxdxx  The following order should be used: axx , cxx , dxx .

Solution (Python):
n,l = map(int,input().split())
s = sorted([input() for i in range(n)])

print("".join(s))

Solution (Python):
n, l = map(int, input().split())
s = []
for _ in range(n):
    s.append(input())
s.sort()
print("".join(s))

Solution (Python):

n,s =map(int,input().split())
 
s = [str(input()) for i in range(n)]
s.sort()

print(*s, sep="")

Solution (Python):
N, L = map(int, input().split())
S = [input() for _ in range(N)]
S.sort()
print(''.join(S))

Solution (Python):
n,l=map(int,input().split())
a=[]
for i in range(n):
    a.append(input())
for j in range(n):
    for i in range(j):
        if a[i]>a[j]:
            b=a[i]
            a[i]=a[j]
            a[j]=b
for i in range(1,n):
    a[0] += a[i]
print(a[0])

Solution (Python):
N, L = map(int, input().split())
words = [input() for _ in range(N)]
words.sort()
ans = ''.join(words)
print(ans)

Solution (Python):
N, L = map(int, input().rstrip().split())
S = [input() for _ in range(N)]
S.sort()
print(*S, sep="")

Solution (Python):
def iroha_loves_strings(N: int, L: int, S: list) -> str:
    return ''.join(sorted(S))


if __name__ == "__main__":
    N = 0
    N, L = map(int, input().split())
    S = [input() for _ in range(N)]
    ans = iroha_loves_strings(N, L, S)
    print(ans)

Solution (Python):
N, L = map(int, input().split())
m = [input() for i in range(N)]
m.sort()
ans = ''
for i in range(N):
    ans += m[i]
print(ans)

Solution (Python):
N,L = map(int,input().split())
S = [input() for _ in range(N)]
S.sort()
res = ""
for i in S:
    res += i
print(res)

Solution (Python):


N, L = map(int, input().split())
s = sorted([input() for i in range(N)])

for i in s:
    print(i, end='')
print()

Solution (Python):
N, L = map(int, input().split())
S = []
for i in range(N):
    line = input()
    S.append(line)
S.sort()
print("".join(S))

Solution (Python):
n,l=input().split()
lists=[]
n=int(n)
for i in range (0,n):
  lists.append(input())
lists.sort()
li=''.join(lists)
print(li)

Solution (Python):
n, l = map(int, input().split())
s = sorted([input() for i in range(n)])
print(*s,sep="")

Solution (Python):
n, l = map(int, input().split())
a = [input() for i in range(n)]

a.sort()

for aa in a:
  print(aa, end="")

Solution (Python):
N,L=map(int, input().split())
l=[input() for i in range(N)]
l.sort()
print(*l,sep="")

Solution (Python):
N, L = map(int, input().split())
S = []
for i in range(N):
    line = input()
    S.append(line)
S.sort()
print("".join(S))

Solution (Python):
N, L = map(int, input().split())

S = []
for s in range(N):
    S.append(input())

S = sorted(S)
print(''.join(S))

Solution (Python):
n,l=map(int,input().split())
A=[input() for i in range(n)]
A.sort()
ans=""
for j in range(n):
  ans += A[j]
  
print(ans)

Solution (Python):
line = input().split(sep=" ")
strnum= int(line[0])
len = int(line[1])

input_str=[]

for i in range(strnum):
	line = input()
	input_str.append(line)

for i in sorted(input_str):
	print(i,end="")

Solution (Python):
i,m = map(int,input().split(" "));
str_list=[];
for _ in range(i):
	str_list.append(input());
str_list=sorted(str_list);
print("".join(str_list));

Solution (Python):
n,m=map(int,input().split())
hoge=[]
for i in range(n):
  hoge.append(input())
hoge.sort()

for i in range(n):
  print(hoge[i],end="")
  
print("")

Solution (Python):
n, l = map(int, input().split())
s = []
for i in range(n):
  s.append(input())
  

s_sorted = sorted(s)



print("".join(s_sorted))

Solution (Python):
def main():
    N, L = map(int, input().split())
    S = []
    strings = ""
    for i in range(N):
        S.append(input())
    S.sort()
    for j in S:
        strings += j
    print(strings)
main()

Solution (Python):
N,L = map(int,input().split())
s =[]
for i in range(N):
    s.append(input())
s.sort()
result = ''.join(s)
print(result)

Solution (Python):
n,l=map(int,input().split())
s=[]
for i in range(n):
  s.append(input())
  
  
s.sort()
print("".join(s))

Solution (Python):
N,b = map(int, input().split())
a = []

for i in range(N):
    d = input()
    a.append(d)
    
g = sorted(a)
print(''.join(g))

Solution (Python):
from sys import stdin
input = stdin.readline
N, L = [int(x) for x in input().rstrip().split()]
S = [input().rstrip() for _ in range(N)]
S.sort()
print("".join(S))

Solution (Python):
m,l = map(int,input().split())
s = sorted([input() for i in range(m)])
print(*s, sep="")

Solution (Python):
N, L = list(map(int, input().split()))
words = ['']*N
for i in range(N):
	words[i] = input()

words.sort()

ans = ''
for word in words:
	ans += word

print(ans)

Solution (Python):
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print("".join(s))

Solution (Python):
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="")

Solution (Python):

from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
mod = 1000000007



"""
a = LI()
i = a.count(5)
j = a.count(7)
if i == 2 and j == 1:
    print("YES")
else:
    print("NO")
"""


n,l = LI()
s = SR(n)
s.sort()
for i in s:
    for j in i:
        print(j,end = "")
print()

"""
def check(n):
    n = list(map(int,list(str(n))))
    s = 0
    for i in n:
        s += f[i]
    return s == 0
n,k = LI()
d = LI()
f = [0 for i in range(10)]
for i in d:
    f[i] = 1
while 1:
    if check(n):
        print(n)
        quit()
    n += 1
"""

"""
def f(x,y):
    return fact[x-1+h-y]*fact[y-1+w-x]*inv_fact[x-1]*inv_fact[y-1]*inv_fact[w-x]*inv_fact[h-y]%mod
h,w,a,b = LI()
fact = [1]*(h+w+1)
for i in range(h+w):
    fact[i+1] = fact[i]*(i+1)%mod
inv_fact = [0]*(h+w+1)
inv_fact[h+w] = pow(fact[-1],mod-2,mod)
for i in range(h+w)[::-1]:
    inv_fact[i] = inv_fact[i+1]*(i+1)%mod
ans = 0
for i in range(1,min(w-b,h-a)+1):
    ans += f(b+i,a+i)
    ans %= mod
print(ans)
"""

Solution (Python):
n, l = map(int, input().split())
s = []
for i in range(n):
    s.append(input())
s.sort()
print(''.join(s))

Solution (Python):
n, l = map(int, input().split())
s = sorted([input() for i in range(n)])
print(*s, sep="")

Solution (Python):
from functools import reduce

def main():
    
    
    
    
    

    
    
    slist = input().rstrip().split(' ')
    N = int(slist[0])
    L = int(slist[1])
    S = []
    ans = ''
    for i in range(0,N):
        S.append(input().rstrip())
    S.sort()
    for i in range(0,N):
        ans = ans + S[i]
    print(ans)
   
if __name__ == '__main__':
    main()

Solution (Python):
N, L = map(int, input().split())
Sn = [input() for _ in range(N)]
print("".join(sorted(Sn)))

Solution (Python):
N, L= map(int,input().split())
data = sorted([input() for i in range(N)])
print("".join(data))

Solution (Python):
input_list = input().split()
N = int(input_list[0])
wordList = list()

for i in range(0,N):
	wordList.append(input())
wordList = sorted(wordList)

answer = ""
for i in range(0,N):
	answer = answer + wordList[i]
print(answer)

Solution (Python):
def main():
    N,L = map(int,input().split())
    S = []
    for _ in range(N):
        S.append(input())
    S.sort()
    for i in range(N):
        print(S[i], end='')

if __name__ == '__main__':
    main()

Solution (Python):
n, l = (int(i) for i in input().split())
s = "".join(sorted([input() for i in range(n)]))
print(s)

Solution (Python):
N, L = list(map(int, input().split()))
S = [input() for i in range(N)]
S.sort()

for s in S:
    print(s, end='')

Solution (Python):
N, L  = map(int, input().split())
data = sorted([input() for i in range(N)])
print(''.join(data))

Solution (Python):
N,L = map(int,input().split())
Ss = [input() for s in range(N)]
Ss.sort()
print("".join(Ss))

Solution (Python):
def main():
    N, L = map(int, input().split())
    S = [input() for _ in range(N)]
    S.sort()
    print("".join(S))


if __name__ == "__main__":
    main()

Solution (Python):
N, L = map(int, input().split())

char_list = []

for dummy in range(N):
    S = str(input())
    char_list.append(S)

char_list = sorted(char_list)
answer = ""
for char in char_list:
    answer += char

print(answer)

Solution (Python):
N, L = map(int, input().split())
S = [input() for _ in range(N)]
S.sort()
print(''.join(S))

Solution (Python):
n,l=map(int,input().split())
ans=[]
for i in range(n):
  s=input()
  ans.append(s)
ans.sort()
print("".join(ans))

Solution (Python):
n,l=map(int,input().split())
ans=[]
for i in range(n):
  s=list(input())
  ans.append(s)
ans.sort()
answer=""
for i in ans:
  p="".join(i)
  answer+=p
print(answer)

Solution (Python):
N, L = map(int, input().split())
S = sorted([input() for x in range(N)])
print("".join(S))

Solution (Python):
N, L = map(int, input().split())
S = [str(input()) for i in range(N)]

S.sort()
for i in S:
    print(i, end='')
print()

Solution (Python):
N, L = map(int, input().split())
all_list = []
for i in range(N):
    S = input()
    all_list.append(S)
all_list.sort()
out_word = ''
for word in all_list:
    out_word = out_word + word
print(out_word)

Solution (Python):
n,l = map(int,input().split())

w = [input() for i in range(n)]

w = sorted(w)

ans = ''

for i in range(n):
    ans += w[i]
    
print(ans)

Solution (Python):
n,l = map(int, input().split())
print(''.join(sorted([input() for _ in '1'*n])))

Solution (Python):
n,l = map(int, input().split())
s = [input() for _ in '1'*n]
print(''.join(sorted(s)))

Solution (Python):
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print("".join(s))

Solution (Python):
N, L = map(int, input().split())
nums = sorted([input() for i in range(N)])
print(''.join(nums))

Solution (Python):


N, _ = map(int, input().split())

strs = []
for _ in range(N):
    strs.append(input())

strs.sort()
print(''.join(strs))

Solution (Python):





N, L = map(int, input().split())
S = [input() for _ in range(N)]

ans = sorted(S)

print(*ans, sep='')

Solution (Python):





N, L = map(int, input().split())
S = [input() for _ in range(N)]

ans = ''.join(sorted(S))

print(ans)

Solution (Python):
n,m=map(int,input().split())
s=''
a=[input()for i in range(n)];a.sort()
for i in range(n):s+=a[i]
print(s)

Solution (Python):
N, L = list(map(int, input().split()))
S = [input() for i in range(N)]

Ss = sorted(S)
print(''.join(Ss))

Solution (Python):
N, L = list(map(int, input().split()))
S = []
for i in range(N):
    S.extend(list(map(str, input().split())))

S = ''.join(sorted(S))
print(S)

Solution (Python):
N,L=map(int,input().split())
S=[]
for i in range(N):
	S.append(input())
S=sorted(S)
ans=""
for i in S:
	ans= ans+i
print(ans)

Solution (Python):
N,L=map(int,input().split())
S=[]
for i in range(N):
	S.append(input())
S=sorted(S)
ans=""
for i in S:
	ans= ans+i
print(ans)

Solution (Python):
N,L=map(int,input().split(' '))
print(''.join(sorted([input() for i in range(N)])))

Solution (Python):



def main():
    n, l = map(int, input().split())
    s = [input() for _ in range(n)]
    s.sort()
    print(''.join(s))

    
if __name__ == '__main__':
    main()

Solution (Python):
n, l = map(int, input().split())
list = [input() for i in range(n)]
list.sort()
print(''.join(list))

Solution (Python):
N, L = map(int, input().split())
S = [input() for _ in range(N)]

S.sort()

print(''.join(S))

Solution (Python):
n,l=map(int,input().split())
list=[]
for i in range(n):
  list.append(input())
list.sort()
word=""
for i in list:
  word+=i
print (word)

Solution (Python):
n,l = map(int, input().split())
a = [input() for i in range(n)]
b = sorted(a)
k = ""
for j in range(n):
  k = k+b[j]
print(k)

Solution (Python):
N, L = map(int, input().split())
Slist = list(input() for _ in range(N))
Slist.sort()
print(''.join(Slist))

Solution (Python):
N, L = map(int,input().split())
S = []
for i in range(N):
    S.append(input())
S.sort()
print(''.join(S))

Solution (Python):
N, L = [int(x) for x in input().split()]
S = []
for i in range(N):
    S.append(input())
S = sorted(S)

result = ""
for j in range(N):
    result += S[j]

print(result)

Solution (Python):
N, L = map(int,input().split())
S = [list(input()) for i in range(N)]
S.sort()
ans = ""
for i in range(N):
    ans += ''.join(map(str, S[i]))
print(ans)

Solution (Python):
N, L = map(int, input().split())
S = []
for n in range(N):
    S.append(input())
print("".join(sorted(S)))

Solution (Python):
n, l = map(int, input().split())
list = []
for i in range(n):
    str = input()
    list.append(str)

list.sort();
for str in list:
    print(str, end = '')

Solution (Python):
L = [int(x) for x in input().split()]
S=[]
for i in range(L[0]):
    s = input()
    S.append(s)
S.sort()
final=''
for i in S:
    final=final+i
print(final)

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
from operator import itemgetter

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())

x,y= (int(i) for i in input().split())       




a=[input() for i in range(x)]    




a.sort()
print(''.join(a))

Solution (Python):
N,L = map(int,input().split())
S = [input() for i in range(N)]
print(''.join(sorted(S)))

Solution (Python):
from functools import reduce
N,L=map(int,input().split())
s=[input() for _ in range(N)]

s = sorted(s)
def concat(a,b):
    return a+b

print(reduce(concat,s))

Solution (Python):
N, L = list(map(int,input().split()))

S = [input() for i in range(N)]

S = sorted(S)
ans = ""

for i in S:
  ans += i
  
print(ans)

Solution (Python):
n,l = map(int,input().split())
ss = [input() for _ in range(n)]

ss = sorted(ss)
print("".join(ss))

Solution (Python):
n,l = map(int, input().split())
ss = [input() for _ in range(n)]
print(''.join([x for x in sorted(ss)]))

Solution (Python):

num, length = map(int, input().split())
words = [input() for word in range(num)]
sort = sorted(words)
word = "".join(sort)
print(word)

Solution (Python):
N, L = [ int(x) for x in input().split() ]
Ss = [ input() for _ in range(N) ]

Xs = Ss
Xs.sort()
ans = "".join(Xs)

print(ans)

Solution (Python):
n, l = map(int, input().split())
l = [input() for i in range(n)]
l.sort()
ans = ""
for i in range(n):
    ans += l[i]
print(ans)

Solution (Python):
""" AtCoder """

N, L = map(int, input().split())
S = [input() for _ in range(N)]

S.sort()

print("".join(S))

Solution (Python):
N, L = map(int, input().rstrip().split(' '))
t = []
for i in range(N):
    S = input().rstrip()
    t.append(S)


t.sort()
print(''.join(t))

Solution (Python):
n,l = map(int,input().split())
s = [input() for i in range(n)]
s = sorted(s)
print(''.join(s))

Solution (Python):
a,b=map(int,input().split())
x=[input() for i in range(a)]
print(''.join(sorted(x)))

Solution (Python):
N, L = map(int, input().split())
s = []
for i in range(N):
    s.append(input())
s.sort()
print(''.join(s))

Solution (Python):
N, L = map(int, input().split())
S = [input() for i in range(N)]

S.sort()
print(''.join(S))

Solution (Python):
n, l = list(map(int, input().split()))
s = [input() for i in range(n)]

s.sort()
print(''.join(s))

Solution (Python):
n, l = map(int, input().split())
strs = []
for i in range(n):
  strs.append(input())
strs.sort()
for x in strs:
  print(x, end='')

Solution (Python):
n,l = map(int,input().split())
s = []
for i in range(n):
    s.append(input())

s = sorted(s)
print("".join(s))

Solution (Python):
n,l = map(int,input().split())
s = [input() for i in range(n)]

s = sorted(s)
print("".join(s))

Solution (Python):
N,L = [int(n) for n in input().split()]
S = sorted([str(input()) for _ in range(N)])
print("".join(S))

Solution (Python):
N, L = map(int, input().split())
S = sorted([input() for _ in range(N)])
print(''.join(S))

Solution (Python):
n, l = [int(i) for i in input().split(' ')]
words = [input() for _ in range(n)]

words = sorted(words)

result = ''

for word in words:
    result += word
print(result)

Solution (Python):
N,L = map(int,input().split())
S = []
for i in range(N):
  S.append(input())
S.sort()
for i in range(N):
  print(S[i],end = '')

Solution (Python):
a, b = map(int, input().split())
list = []
for i in range(a):
  word = input()
  list.append(word)
  
c = sorted(list)
d = ""
for j in range(a):
  d += c[j]
print(d)

Solution (Python):
N,L=map(int,input().split())
S=[input() for i in range(N)]
S.sort()
print(''.join(S))

Solution (Python):
n,l=map(int, input().split())
lst = []
for _ in range(n):
  lst += [input()]
lst.sort()
print("".join(lst))

Solution (Python):
n, l = map(int, input().split())
s = sorted([input() for i in range(n)])

for i in range(n):
    print(s[i],end = "")

Solution (Python):
n,l=[int(i) for i in input().split()]
s=[input() for i in range(n)]
s.sort()
text=""
for i in range(n):
    text+=s[i]
print(text)

Solution (Python):
n,l = map(int, input().split())
s_list = [input() for _ in range(n)]
print(''.join(sorted(s_list)))

Solution (Python):

N, L = map(int, input().split())
S = []
for _ in range(N):
    S.append(input())
print(''.join(sorted(S)))

Solution (Python):
N,L=map(int,input().split())
l=[]
for i in range(N):
    l.append(str(input()))
l.sort()
A=''
for i in range(N):
    a=str(l[i])
    A+=a
print(A)

Solution (Python):
N,L = map(int,input().split())
S = []

for i in range(N):
  s = input()
  S.append(s)
S.sort()

str = ''.join(S)
print(str)

Solution (Python):
N, L = map(int, input().split())
S = sorted([input() for i in range(N)])
print(''.join(S))

Solution (Python):
N, L = map(int,input().split())
S = sorted([input() for i in range(N)])
print(''.join(S))

Solution (Python):


N, L = map(int, input().split())
S = [input() for i in range(N)]

S = sorted(S)
rtn = ''.join(S)
print(rtn)

Solution (Python):
n,l=map(int,input().split())
A=[]
for i in range(n):
  A.append(input())
A.sort()
d=""
for i in range(n):
  d+=A[i]
print(d)

Solution (Python):
n,l=map(int,input().split())
li=[input() for _ in range(n)]
li.sort()
ans=""
for i in range(n):
    ans+=li[i]
print(ans)

Solution (Python):
import fileinput

def main(str_list):
    str_list.sort()
    result = ""
    for s in str_list:
        result += s
    print(result)

if __name__ == '__main__':
    str_list = []
    for line in fileinput.input():
        str_list.append(line.rstrip())
    main(str_list[1:])

Solution (Python):

n,l=map(int,input().split())
a=[]
for i in range(n):
	a.append(input())

a.sort()

l=''
for i in a:
	l+=str(i)

print(l)

Solution (Python):
n,l=map(int,input().split())
a=[]
for i in range(n):
    a.append(input())
a.sort()
for i in range(n):
    print(a[i],end="")
print("")

Solution (Python):
N, L = map(int,input().split())
S = sorted([input() for _ in range(N)])
print(''.join(S))

Solution (Python):
N, L = map(int, input().split())
lst = []
for i in range(N):
    lst.append(input())
lst = sorted(lst)
for s in lst:
    print(s, end = "")
print()

Solution (Python):
n,l=(int(i) for i in input().split())
print(''.join(sorted([input() for i in range(n)])))

Solution (Python):
N, L = map(int, input().split())
S = []
for _ in [0]*N:
    S.append(input().rstrip())
S.sort()
print(''.join(S))

Solution (Python):
N,L = map(int,input().split())
strs = []
for _ in range(N):
    strs.append(str(input()))
strs.sort()
print(''.join(strs))

Solution (Python):
n,l=map(int,input().split())
print(''.join(sorted([input() for i in range(n)])))

Solution (Python):
N,_ = map(int,input().split())
print(''.join(sorted([input() for _ in range(N)])))

Solution (Python):
N,L = map(int,raw_input().split())

S = [raw_input() for i in range(N)]

S.sort()

print ''.join(S)

Solution (Python):
com=input().split()
data=[]
for i in range(int(com[0])):
    data.append(input())

data.sort()
data=''.join(data)
print (data)

Solution (Python):
n,l=map(int, input().split())
strs = []
for i in range(n):
  strs.append(input())
strs.sort()
strs = ''.join(strs)
print(strs)

Solution (Python):
n, _ = map(int, input().split())
s = [input() for i in range(n)]
s.sort()
print("".join(s))

Solution (Python):
N,L=map(int,input().split())
S=[input() for _ in range(N)]
S.sort()

print(','.join(S).replace(',',''))

Solution (Python):
N, L = map(int, input().split())

l = []

for i in range(N):
    l.append(input())

l.sort()

for i in range(N):
    print(l[i], end='')

print()

Solution (Python):
n, l = list(map(int, input().split()))
ss = []
for _ in range(n):
    ss.append(input())
ss.sort()

ans = ''
for s in ss:
    ans += s

print(ans)

Solution (Python):
n,a = map(int,input().split())
l = []
for i in range(n):
    l.append(str(input()))
print("".join(sorted(l)))

Solution (Python):
n,l = map(int,input().split())
l = []
for i in range(n):
    s = str(input())
    l.append(s)
a = sorted(l)
print("".join(a))

Solution (Python):
N,L=map(int,input().split())
print(*sorted([input() for i in range(N)]),sep="")

Solution (Python):
n,l=list(map(int,input().split()))
string_list=[input() for i in range(n)]
string_list.sort()
result=''
for i in range(n):
    result +=string_list[i]
print(result)

Solution (Python):
n,l = map(int, input().split())
a = [input() for i in range(n)]
a.sort()
print(('').join(a))

Solution (Python):
NL = list(map(int, input().split()))
s_list = [input() for i in range(NL[0])]
s_list.sort()
ans = ''.join(s_list)
print(ans)

Solution (Python):
N, L = [int(x) for x in input().split()]

S = []

for i in range(N):
  S.append(input())

print(''.join(sorted(S)))

Solution (Python):
n,l=input().split()
N=int(n)
L=int(l)
s=[]
for i in range(N):
  s.append(input())
s.sort()
print(("").join(s))

Solution (Python):
n,l=map(int,input().split())
print(*sorted([input() for i in range(n)]),sep='')

Solution (Python):
str_num, str_len = input().rstrip().split(" ")
str_list = []
for i in range(int(str_num)):
  str_list.append(input())
  
str_list = sorted(str_list)
for string in str_list:
    print(string, end="")

Solution (Python):
n, s = map(int, input().split())
wlist = [input() for _ in range(n)]
wlist.sort()
print("".join(wlist))

Solution (Python):
n,l=map(int,input().split())
a=[]
for i in range(n):
    a.append(input())
b=sorted(a)
s=""
for j in b:
    s+=j
print(s)

Solution (Python):

n,l = map(int, input().split())


slist = []
for i in range(n):
    slist.append(input())
"""
if 'a' < 'd':
    print('1')
else:
    print('0')

"""

for i in range(n):
    j = i + 1
    for j in range(n):
        for k in range(l):
            if slist[i][k] < slist[j][k]:
                slist[i], slist[j] = slist[j],slist[i]
                break
            elif slist[i][k] > slist[j][k]:
                break

out = ''            
for i in slist:
    out = out + i


print(out)

Solution (Python):
N,L=map(int,input().split())
S=[]
for i in range(N):
    S.append(str(input()))
S.sort()
ans=''.join(S)
print(ans)

Solution (Python):
n,l=map(int,input().split())
s =[]
for _ in range(n):
    t = input()
    s +=[t]

s.sort()

ans =""
for x in s:
    ans +=x

print(ans)

Solution (Python):
N, L = input().split(" ")
dic = []
for _ in range(int(N)):
    dic.append(input())
print("".join(sorted(dic)))

Solution (Python):
n, l = map(int, input().split())
s = [input() for i in range(n)]

s.sort()
print(''.join(s))

Solution (Python):
n,l = map(int,input().split())
words = sorted([str(input()) for i in range(n)])
ans = ""
for i in range(n):
    ans += words[i]
print(ans)

Solution (Python):
n,m=map(int,input().split())
A=sorted([input() for s in range(n)])
print("".join(A))

Solution (Python):
print(*sorted(open(0).read().split()[2:]),sep='')

Solution (Python):
print(*sorted(open(0).read().split()[2:]),sep='')

Solution (Python):
print(''.join(sorted(open(0).read().split()[2:])))

Solution (Python):
n,a = map(int,input().split())
str_list = [input() for i in range(n)]

str_list.sort()

answer = ''

for i in range(n):
  answer += str_list[i]

print(answer)

Solution (Python):
N, L = map(int, input().split())
res = ''

S = [ input() for i in range(N)]
S.sort()

for s in S:
    res += s
    
print(res)

Solution (Python):
N,L = [int(i) for i in input().split()]
D   = [input() for j in range(N)]
D_sort = sorted(D)
print("".join(D_sort))

Solution (Python):
N,L =[int(i)for i in input().split()]
S =[input()for _ in range(N)]
S =sorted(S)
print("".join(S))

Solution (Python):
N, L = map(int, input().split())
l = []
for i in range(N):
    l.append(input())
l.sort()
s = ''
for i in l:
    s += i
print(s)

Solution (Python):
N, L = list(map(int, input().split()))

def solve():
    strs = []
    for _ in range(N):
        strs.append(input())

    strs.sort()

    return "".join(strs)

print(solve())

Solution (Python):
n, l = map(int, input().split())
S = sorted([[input()] for i in range(n)])
A = ''
for s in S:
    A += s[0]
print(A)

Solution (Python):
a=[]
for i in range(map(int,input().split()).__next__()):
    a.append(input());
a.sort();
for s in a:
    print(s,end='')

Solution (Python):
a,b=[int(i) for i in input().split()]
c=[]
for i in range(a):
    c.append(input())
c.sort()
for i in c:
    print(i,end="")

Solution (Python):
n, l = map(int, input().split())
s = []
for _ in range(n):
    s.append(str(input()))

print("".join(sorted(s)))

Solution (Python):
N, L = map(int, input().split())
print(''.join(sorted([input() for _ in range(N)])))

Solution (Python):
N,L=map(int,input().split())
s = []
for i in range(N):
    s.append(input())
s.sort()
print(''.join(s))

Solution (Python):
N, L = map(int, input().split())
words = []
for i in range(N):
  words.append(input())
new_words = sorted(words)

ans = ''
for w in new_words:
  ans += w
print(ans)

Solution (Python):
n,l=map(int,input().split())
s=[input() for i in range(n)]
s.sort()
fln=''
for i in range(n):
  fln+=s[i]
print(fln)

Solution (Python):
n,l = list(int(i) for i in input().split())
s = [input() for i in range(n)]
s.sort()
print(''.join(s))

Solution (Python):
n,l=map(int,input().split())
s=[input() for _ in range(n)]
s.sort()
print("".join(s))

Solution (Python):
n, k = list(map(int, input().split()))
li = []
for _ in range(n):
    li.append(input())

li.sort()
print(''.join(li))

Solution (Python):
n, l = map(int, input().split())
s = [input() for i in range(n)]
s.sort()
mojiretsu = ''

for x in s:
    mojiretsu += x
print(mojiretsu)

Solution (Python):
N,L=map(int,input().split())
list=[]
i=0
while i<N:
    S=input()
    list.append(S)
    i+=1
list.sort()
print(''.join(list))

Solution (Python):
n, l = map(int, input().split())
index=0
listS=[]
while index < n:
    s = input()
    listS.append(s)
    index+=1
listS.sort()

print("".join(listS))

Solution (Python):
N,L = map(int,input().split())
s = list(input() for i in range(N))

s_sort = sorted(s)
ans = "".join(s_sort)
print(ans)

Solution (Python):
N, L = map(int, input().split())
S = [input() for i in range(N)]
S.sort()
print("".join(S))

Solution (Python):
n,l = map(int,input().split())
A = [input() for _ in range(n)]
A.sort()
ans = ''
for i in range(n):
    ans += A[i]
 
print(ans)

Solution (Python):
n,l = map(int,input().split())
a=list(input() for i in range(n))
a.sort()
s=''
for i in range(n):
  s+=a[i]
print(s)

Solution (Python):
N,L=map(int,input().split())
S=[0]*N
for i in range(N):
    S[i]=input()
S.sort()
ans=''
for i in range(N):
    ans+=S[i]
print(ans)

Solution (Python):
N, L = map(int, input().split())
S = ['_'] * N
for i in range(N):
    S[i] = input()
print(''.join(sorted(S)))

Solution (Python):
N,L = map(int,input().split())
s = [input() for i in range(N)]
s.sort()
ans = "".join(s)
print(ans)

Solution (Python):

n=int(input().split()[0])
l=[]
for i in range(n):
  l.append(input())
l.sort()
r=""
for i in l:
  r+=i
print(r)

Solution (Python):
amount, length = map(int, input().rstrip().split())
str_list =sorted([input().rstrip() for a in range(amount)])
the_str = ''
for a in range(amount):
  the_str += str_list[a]

print(the_str)

Solution (Python):
n,l=map(int,input().split())
p=[input()for i in range(n)]
p.sort()
a=p[0]
for i in range(1,n):
    a+=p[i]
print(a)

Solution (Python):

str_input_list = input().rstrip().split(' ')

int_input_list = []
for a in str_input_list:
    int_input_list.append(int(a))

amount = int_input_list[0]
length = int_input_list[1]


mojiretu_list = []
for a in range(amount):
    mojiretu_list.append(input())



sorted_list = sorted(mojiretu_list)
min_mojiretu = ''
for a in range(amount):
    min_mojiretu += sorted_list[a]


print(min_mojiretu)
print()

Solution (Python):
amount, length = map(int, input().split())
S = sorted([input() for a in range(amount)])
print(''.join(S))

Solution (Python):
N, L = map(int, input().split())
S = [input() for i in range(N)]

S.sort()
for s in S:
    print(s,end='')
print()

Solution (Python):
n,l = input().split()
s = [input() for i in range(int(n))]
s.sort()
print("".join(s))

Solution (Python):
N , L = map(int,input().split())
alpha='abcdefghijklmnopqrstuvwxyz'
def which(a,b):
    l=len(a)
    for i in range(l):
        x=alpha.index(a[i])
        y=alpha.index(b[i])
        if x<y:return True
        if x>y:return False
        
S = []
S.append(str(input()))
for i in range(1,N):
    Si=str(input())
    for j in range(len(S)):
        vs=S[j]
        if which(Si,vs):
            Slist=[]
            Slist.append(Si)
            if j==0:
                S=Slist+S
            else:S = S[:j]+Slist+S[j:]
            break
        if j==len(S)-1:S.append(Si)
        
result=''
for i in range(N):
    result+=S[i]
print(result)

Solution (Python):
a, b = map(int, input().split())
L=[input() for _ in range(a)]
L=sorted(L)
tmp=""
for x in L:
    tmp += x
print(tmp)

Solution (Python):
n,l=map(int,input().split())
s=[input() for i in range(n)]
print("".join(sorted(s)))

Solution (Python):
n, l = map(int, input().split())

sn = []

for _ in range(1, n+1):
  sn.append(input())
  
sn = sorted(sn)

sn = ''.join(sn)

print(sn)

Solution (Python):
def execute(n, l, sn):
    return ''.join(sorted(sn))
    pass


if __name__ == '__main__':
    n, l = map(int, input().split())
    sn = []
    for _ in range(n):
        sn.append(input())
    print(execute(n, l, sn))

Solution (Python):
n,l=map(int,input().split())
print(*sorted([input() for i in range(n)]),sep="")

Solution (Python):
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="")

Solution (Python):
a,b = map(int,input().split())
k = []
s = ""
for i in range(a):
    k.append(input())
k.sort()
for i in k:
    s+=i
print(s)

Solution (Python):
n, l = map(int, input().split())
s = [input() for _ in range(n)]
s.sort()
print(''.join(s))