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())
f=[]
for i in range(n):
    f.append(input())

print(''.join(sorted(f)))

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

Solution (Python):


input_line = input().split()
vertical = int(input_line[0])
row = int(input_line[1])
line = list()
for i in range(vertical):
    line.append(input())
    
line.sort()
for i in line:
    print(i ,end = "")

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

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

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

S = sorted(S)

out = ''
for i in range(len(S)):
  out += S[i]
print(out)

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

for s in li:
  ans += s
  
print(ans)

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

lis = []

for n in range(N):
  lis.append(input())
  j = n
  if not n == 0:
    while lis[j-1]>lis[j] and j>0:
      lis[j-1:j+1] = [lis[j], lis[j-1]]
      j -= 1

ans = ''
      
for e in lis:
  ans += e
  
print(ans)

Solution (Python):
N,L=map(int,input().split())
d=[list(str(input())) for i in range(N)]
d.sort()
d_list=d[0]
for i in range(1,len(d)):
    d_list+=d[i]
print("".join(d_list))

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, l = map(int, input().split())
    S = sorted(list(input() for _ in range(n)))
    print("".join(S))


if __name__ == '__main__':
    resolve()

Solution (Python):
n = [int(tmp) for tmp in input().split()]
a = []
for i in range(n[0]) :
	s = input()
	a.append(s)
a.sort()
print(''.join(a))

Solution (Python):
n = [int(tmp) for tmp in input().split()]
a = []
for i in range(n[0]) :
	s = input()
	a.append(s)
a.sort()
print(''.join(a))

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

Solution (Python):
line  =input().split(' ')
ln = []
for i in range(int(line[0])):
    ln.append(input())
outline= ''
for i in sorted(ln):
    outline += i
print (outline)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    N, L = map(int, input().split())
    S = [None] * N
    for i in range(N):
        S[i] = input().rstrip()

    S = sorted(S)
    ans = "".join(S)
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import numpy as np
s_list = "abcdefghijklmnopqrstuvwxyz"
N,L=map(int, input().split())
S=[]
Ls=[]
for i in range(N):
  s = str(input())
  S.append(s)
  ls=0
  for k in range(L):
    ls = ls + s_list.index(s[L-k-1])*(100**k)
  Ls.append(ls)
  
Ls = np.array(Ls)

ind = Ls.argsort()
ans = ""
for i in range(N):
  ans = ans + S[ind[i]]
print(ans)

Solution (Python):
H, W = map(int, input().split())
S = []
for _ in range(H):
    S.append(input())

S.sort()
str1=''
for i in range (H):
    str1=str1+S[i] 
print(str1)

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

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

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

print("".join(table))

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n,l=mii()
arr=[]
for i in range(n):
    arr.append(ss())

arr.sort()
print("".join(arr))

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())
S = sorted([input() for i in range(N)])
print("".join(S))

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

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

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())
s = list()

for i in range(n):
    s.append(input())

s.sort()


print(''.join(s))

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

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

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

print(ans)

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

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

Solution (Python):
def main(input: list):
    print("".join(sorted(input)))


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

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.sort()
ans = ""
for i in range(n):
    ans += s[i]
print(ans)

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

Solution (Python):
n, l = map(int, input().split())
s = [0] * 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 = sorted(S)
print(*S, sep = "")

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

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

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())
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):
n,l = map(int,input().split())

list = [str(input()) for i in range(n)]
List = sorted(list)
a = str()
for i in range(len(List)):
    a += str(List[i])
    
print(a)

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


if __name__ == '__main__':
    main()

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

print(*a,sep="")

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin
import math

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

S_sorted = sorted(S)

print(''.join(S_sorted))

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

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

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

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

for i in range(N):
    ans += min(S)
    del S[S.index(min(S))]

print(ans)

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

res = ""
for i in newlist:
    res = res + newlist[0]
    newlist = newlist[1:]
print(res)

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

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

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

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

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

s = []

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

new_list = sorted(s)
print(''.join(new_list))

Solution (Python):
















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

Slist.sort()

print(*Slist,sep="")

Solution (Python):
num, len = map(int, input().split())

strings = []
for n in range(num):
    strings.append(input())

strings.sort()

print(''.join(strings))

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

result = ""
for i in sorted_S:
    result += i

print(result)

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

print("".join(s))

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n, l = list(map(int, readline().split()))

    s = [input() for _ in range(n)]

    s.sort()

    print(*s,sep="")


if __name__ == '__main__':
    main()

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

Solution (Python):
INT_MAX=10**18+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]

n,l=INPUT()
A=[]
for i in range(n):
    x=input()
    A.append(x)
A.sort()
ans=""
for ele in A:
    ans+=ele
print(ans)

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

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

print(*sorted(listA),sep="")

Solution (Python):

n_and_l = input()

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


text = []

for num in range(0, n):
    text.append(input())


for object in range(1, n):
    for compare in range(0, object):
        if text[object] < text[compare]:
            tmp = text[object]
            text[object] = text[compare]
            text[compare] = tmp

answer = ""

for num in range(0, n):
    answer = answer + text[num]

print(answer)

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

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

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

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

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

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,operator,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())

N,L = LI()
S = sorted([S() for _ in range(N)])
print(*S,sep='')

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

S.sort()

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

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

s.sort()
ans = s[0]
for i in range(1,n):
    ans += s[i]

print(ans)

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

Solution (Python):
import sys


def main():
    input = sys.stdin.readline
    n, l = map(int, input().split())
    s = [input().rstrip() for i in range(n)]

    s.sort(key=lambda x: [x[i] for i in range(l)])

    print(''.join(s))


if __name__ == '__main__':
    main()

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

List2 = sorted(List)
print("".join(List2))

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

s_s = sorted(s)

print("".join(s_s))

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

s_s = sorted(s)

print("".join(s_s))

Solution (Python):

def myAnswer(N:int,L:int,S:list)->str:
   S.sort()
   ans = ""
   for s in S:
      ans+=s
   return ans

def modelAnswer():
   tmp=1
def main():
   N,L=map(int,input().split())
   S =[]
   for _ in range(N):
      S.append(str(input()))
   print(myAnswer(N,L,S[:]))


if __name__ == '__main__':
   main()

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

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

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

nl = []
for i in range(n):
    a = input()
    nl.append(a)

nl.sort()

for x in nl:
    print(x, end="")

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

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

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

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

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

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

Solution (Python):



def main():
    N, l = map(int,input().split())
    s_sorted = sorted([input() for i in range(N)])
    print("".join(s_sorted))

if __name__ == '__main__':
    main()

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

Solution (Python):
number,length=map(int,input().split())
input_list=[]
out=''
for i in range(number):
    input_list.append(input())
input_list.sort()
for i in input_list:
    out+=i
print(out)

Solution (Python):
p = input('')
q = p.split(' ')
n = int(q[0])
a = [input('') for i in range(n)]
b = sorted(a)
print(''.join(b))

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

S.sort()

s = ""
for i in range(N):
    s += S[i]

print(s)

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

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 _ in range(n)]
s.sort()
ans = ""
for i in s:
    ans += i
print(ans)

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

Solution (Python):
icase=0
if icase==0:
    n,l=map(int,input().split())
    s=[]
    for i in range(n):
        si=input()
        s.append(si)
    s.sort()
    ss=""
    for i in range(n):
        ss=ss+s[i]
    print(ss)

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007



def main():
	
	n,l = IN()
	ss=[]
	for _ in range(n):
		s = input()
		ss.append(s)
	ss.sort()
	return ''.join(ss)
	
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

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

s = []
for i in range(n):
    s.append(input())

s.sort()

[print(i, end='') for i in s]
print()

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

S = [0] * N

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

S = sorted(S)

result = ''

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

print(result)

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

S.sort()

ans = ''
for el in S:
    ans += el
print(ans)

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

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

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

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

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

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

s =sorted([input() for i in range(a)])

print(''.join(s))

Solution (Python):



def main():
    N, l = map(int,input().split())
    s = []

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

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

if __name__ == '__main__':
    main()

Solution (Python):



def main():
    N, l = map(int,input().split())
    s = []

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

    s_sorted = sorted(s)
    answer = ""

    for i in range(N):
        answer += s_sorted[i]

    print(answer)

if __name__ == '__main__':
    main()

Solution (Python):
import collections, math, bisect

local = False
if local:
    file = open("input.txt", "r")
    import time

def inp():
    if local:
        return file.readline().rstrip()
    else:
        return input().rstrip()

def ints():
    return [int(_) for _ in inp().split()]


if local:
    start=time.time()

N, L = ints()
S = [""]*N

for i in range(N):
    S[i] = inp()

S.sort()

ans = []

for s in S:
    ans.append(s)

print("".join(ans))


if local:
    fin = (time.time()-start)*1000
    print("{:.2f}".format(fin) + "ms")

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

sj = sorted(si)

sans = ''
for i in range(n):
  sans += sj[i]

print(sans)

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

s = [input() for i in range(I[0])]

s = sorted(s)

mojiretu = ''.join(s)

print(mojiretu)

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())
s=sorted([input() for i in range(n)])
for i in s:
    print(i,end="")

Solution (Python):
def order(str1, str2):
  for i in range(len(str1)):
    if ord(str1[i]) > ord(str2[i]):
      return False
    elif ord(str1[i]) == ord(str2[i]):
      continue
    else:
      return True
 
def sort(str_list):
  for i in range(len(str_list) - 1):
    for j in range(i + 1, len(str_list)):
      if not order(str_list[i], str_list[j]):
        temp = str_list[i]
        str_list[i] = str_list[j]
        str_list[j] = temp
  ans = ""
  for i in str_list:
    ans += i
  return ans
 
line1 = input().split()
n = int(line1[0])
l = line1[1]
str_list = []
for i in range(n):
  str_list.append(input())
print(sort(str_list))

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





strs = [input() for _ in range(n)]
strs.sort()
strs = ''.join(strs)
print(strs)

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())
li=[]
while n>0:
    a=input()
    li.append(a)
    n-=1
kk=sorted(li)
moji=''
for x in kk:
    moji+=x
print(moji)

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

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

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

Solution (Python):
n, l = [int(x) for x in input().split()]
S = [input() for x in range(n)]

ans = list(sorted(S))

print(''.join(ans))

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

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

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

Solution (Python):
cc,tot=(int(x) for x in input().split())
al=[]
for i in range(cc):
  al.append(input()) 

al.sort()
answer=''.join(al)
print(answer)

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

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

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

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

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())
s = [input() for _ in range(n)]
s.sort()

ans = ""

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

print(ans)

Solution (Python):
N, L = map(int, input().split())
l = list()
for i in range(0, N):
    s = input()
    l.append(s)
l = sorted(l)
mojiretsu = "".join(l)
print(mojiretsu)

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

Solution (Python):
def resolve():
	n, m = map(int, input().split())
	w = list()
	ans = ""
	for _ in range(n):
		w.append(input())
	w.sort()
	for word in w:
		ans += word
	print(ans)

resolve()

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


l.sort()
blank = ""
for i in range(len(l)):
	blank = blank + l[i]

print(blank)

Solution (Python):

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


if __name__ == "__main__":
    resolve()

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

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

    for i in range(N):
        word_list.append(input())
    
    word_list.sort()

    print("".join(word_list))
main()

Solution (Python):
N,L = map(int,input().split())
S = [input() for i in range(N)]
S = sorted(S)
for n in range(N):
  tmp = S.pop(0)
  print(tmp,end = "")

Solution (Python):

import collections


def solve(n, l, strings):
    strings.sort()

    return "".join(strings)


[n, l] = list(map(int, input().strip().split()))
strings = []

for i in range(n):
    string = input().strip()
    strings.append(string)

print(solve(n, l, strings))

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

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

Solution (Python):
n, l = map(int, input().split())
s = []
for i in range(n):
    s.append(input())
s.sort()
ans = ""
for i in s:
    ans += i
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())
S = []
for _ 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.sort()

print(''.join(s))

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


a.sort()

print("".join(a))

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

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

for i in range(n-1):
  s = input()
  for j in range(len(sorted)):
    if s < sorted[j]:
      sorted.insert(j, s)
      break
    if j == len(sorted)-1:
      sorted.append(s)
ans = ""
for x in sorted:
  ans = ans + x
print(ans)

Solution (Python):
n, l = map(int, input().split())
s = list()
for i in range(n):
    s.append(str(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):
N, L = map(int, input().split())
S = [input() for i in range(N)]
s = sorted(S)
print(*s, sep='')

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

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

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

Solution (Python):
import sys

N, L = map(int, sys.stdin.readline().split(" "))
S = sorted([sys.stdin.readline().rstrip() for i in range(N)])
print("".join(S))

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

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

moji=[]

for i in range(n):
    moji.append(input())
moji.sort()

print("".join(moji))

Solution (Python):
import numpy
n, l = list(map(int, input().split()))
a = []

for _ in range(n):
    a.append(input())

a.sort()

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

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

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

for i in range(N):
    if (min(S) == "~XXX"):
        break

    print(min(S).replace('\n',''),end="")
    
    S[S.index(min(S))] = "~XXX"

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

print(''.join(sorted(Iroha)))

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    N, L = map(int, input().split())
    S = [None] * N
    for i in range(N):
        S[i] = input().rstrip()
    S.sort()
    ans = "".join(S)
    print(ans)


if __name__ == "__main__":
    main()

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

s_list = sorted(s_list)

answer = ''.join(s_list)
print(answer)

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

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

Solution (Python):
from itertools import permutations
import sys

sys.setrecursionlimit(10 ** 6)
from bisect import *
from collections import *
from heapq import *

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

def main():
    n,l=MI()
    ss=[SI() for _ in range(n)]
    ss.sort()
    print("".join(ss))

main()

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


if __name__ == '__main__':
    main()

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

print(''.join(sorted(input_lines)))

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

S.sort()
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, L = map(int, input().split())
S = [input() for i in range(N)]

S.sort()
S = "".join(S)
print(S)