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):
lengh, count = map(int, input().split())
strlist = []
for i in range(0,lengh):
    strlist.append(input())
strlist.sort()
print("".join(strlist))

Solution (Python):
lengh, count = map(int, input().split())
strlist = []
for i in range(0,lengh):
    strlist.append(input())
strlist.sort()
print("".join(strlist))

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

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

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

print(''.join(sorted(str_lists)))

Solution (Python):


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

ans = ''.join(sorted(T))
print(ans)

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

s.sort()
tmp = [print(x, end='') for x in s]
print()

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

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

new_list = sorted(strs)

join = ''
for x in new_list:
    join += x

print(join)

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 = []
for i in range(n):
    S.append(input())
print(''.join(sorted(S)))

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

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

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

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

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

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

s.sort()
ans=''
for j in range(n):
    ans+=s[j]
print(ans)

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

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

sl = sorted(sl)

print("".join(sl))

Solution (Python):

 
import math
import itertools
import sys
import copy
 

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

list.sort()

ans = ""
for i in range(N) :
  ans += list[i]

print (ans)

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

s.sort()

print("".join(s))

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

Solution (Python):

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

a = sorted(s)

print("".join(a))

Solution (Python):
import math
import fractions

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

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

Solution (Python):


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

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

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

w = []

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

w = sorted(w)

print(''.join(w))

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

a.sort()

b = "".join(a)
print(b)

Solution (Python):
N, L = map(int,input().split())
S = sorted([input().rstrip("\n") for _ in range(N)])
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 , 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):
N, L = map(int, input().split())
a = []
for _ in range(N):
    a.append(input())
a.sort()
ans = ''
for i in a:
    ans += i
print(ans)

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

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

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

List_sorted = sorted(s)
ans = ""

for i in List_sorted:
  ans = 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):
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)])
print(*s,sep="")

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

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

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 i in range(n):
    s.append(input())
print(''.join(sorted(s)))

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

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

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

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

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

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

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

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

print("".join(S))

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

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

s.sort()
answer = ""

for i in range(len(s)):
	answer += s[i]

print(answer)

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

Solution (Python):
N, L = map(int, input().split())
arr = [input() for i in range(N)]
arr = sorted(arr, key=lambda ele: ele, reverse=False)
ans = ""
for s in arr:
    ans += s
print(ans)

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

word = [input() for i in range(n)]
word.sort()
a = ""
for i in range(n):
  a += word[i] 
print(a)

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

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

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

words = str()

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

Solution (Python):
N, L = map( int, input().split() )
S = list( str(input()) for x in range(N) )
S.sort()    
print( "".join( S ) )

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

ls_ans = sorted(ls_s)

ans = ''

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

print(ans)

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

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

Solution (Python):
ip1 = input().split()
N = int(ip1[0])
L = int(ip1[1])
strings = []
for i in range(N):
    strings.append(input())
strings.sort()
ans = ""
for i in range(len(strings)):
    ans += strings[i]

print(ans)

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

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

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

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

res = "".join(lix)
print(res)

Solution (Python):

import sys
import itertools
import math

i=0

N, L=input().split()







N=int(N)
W=int(L)


T_dummy_list=[]
sentence_list=[]
total=0
mojiretu=""








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






i=0
j=0








sentence_list=sorted(s)

for i in range(N):
    mojiretu += sentence_list[i]

print(mojiretu)

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

l = sorted([input() for _ in range(a)])

print(''.join(l))

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

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

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

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

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

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

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

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

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

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

book = []

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

builded = ""
for i in sorted(book):
    builded += i

print(builded)

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

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

Solution (Python):

import numpy as np

valueA = list(map(int,input().split()))

valueB = [0] * valueA[0]

for i in range(valueA[0]):
    valueB[i] = input()
    
array = np.array(valueB)

array1 = np.sort(array)

for i in range(len(array1)):
    print(array1[i],end="")

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

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 = list(input() for i in range(N))
S.sort()
for j in range(N):
    print(S[j],end="")

Solution (Python):
n,l=map(int,input().split())
s=[""]*n
for i in range(n):
  s[i]=input()
ans=""
for _ in range(n):
  ne=s[0]
  for word in s:
    if word<ne:
      ne=word
  s.remove(ne)
  ans+=ne
print(ans)

Solution (Python):
import sys

n, l, *s = sys.stdin.read().split()

def main():
    s.sort()
    t = ''.join(s)
    return t

if __name__ == '__main__':
    ans = main()
    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())
a=[input() for _ in range(n)]
a.sort()
print(*a,sep="")

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

d  =[input() for i in range(n)]
ans = "".join(sorted(d))


print(ans)

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

ans = ''.join(words)
print(ans)

Solution (Python):
a=input().split()
b=int(a[0])
data = [input() for i in range(b)]
data.sort()


k="".join(data)
print(k)

Solution (Python):
a=input().split()
b=int(a[0])
data = [input() for i in range(b)]
data.sort()


k=""
for i in data:
    k=k+i
print(k)

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

word_list = sorted(word_list)
word = ""
for i in range(N):
    word += word_list[i]

print(word)

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 _ in range(n)]
s.sort()
print("".join(s))

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

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 = sorted([input() for _ in range(N)])

print(''.join(S))

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

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

print(''.join(S))

Solution (Python):
import sys
N,L,*V=sys.stdin.read().split()
print(*sorted(V),sep="")

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

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

print(''.join(s_sorted))

Solution (Python):
from functools import reduce

N, L = map(int, input().split())
iroha = []

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

iroha.sort()

print(reduce(lambda a,b: a+b, iroha))

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

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

Solution (Python):


def main()->None:
    (N, L) = map(int, input().split())
    range_N = range(N)
    s = []
    for i in range_N:
        s.append(input())
    sorted_s = sorted(s)
    print("".join(sorted_s))







if __name__ == "__main__":
    main()

Solution (Python):
N,L = map(int,input().split())
Liste_Iroha = list(map(str,[input() for i in range(N)]))
res = ''
for word in sorted(Liste_Iroha):
    res = res + word
print(res)

Solution (Python):

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


moji=[]

for i in range(N):
    
    tmp = input()
    
    moji.append(tmp)
    

moji.sort()


print("".join(moji))

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

a = sorted(a)
print(*a, sep='')

Solution (Python):



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

S.sort()

print(''.join(S))

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

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

s.sort()
ans="".join(s)
print(ans)

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

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

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

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

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

Sort=sorted(S)
word=""
for i in range(N):
  word=word+Sort[i]
  
print(word)

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

Solution (Python):
a = input().rstrip().split()
N=int(a[0])
L=int(a[1])
l=[]

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

l.sort()

ans=""
for i in range(N):
    ans+=l[i]
print(ans)

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

Solution (Python):
N, L = list(map(int, input().split()))
S = [input() for i in range(N)]
num = []
ans = []
answer = []
for i in range(len(S)):
    num.append(list(map(ord, str(S[i]))))
num.sort()
for i in range(len(num)):
    ans.append(list(map(chr, num[i])))
for i in range(len(ans)):
    answer.append("".join(ans[i]))
print("".join(answer))

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

s.sort()
string = ""

for i in s:
    string += i

print(string)

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,l = [int(i) for i in input().split()]
lst = []
for _ in range(n):
  lst.append(input())
lst.sort()
s = ''
for i in lst:
  s += i
print(s)

Solution (Python):
N, _ = input().split(' ')
N = int(N)

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

print(''.join(sorted(strs)))

Solution (Python):
a, b = map(int, input().split())
c = sorted(input() for i in range(a))
print(*c, sep="")

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

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

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

sorted_strings = sorted(strings)

print(''.join(sorted_strings))

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

Solution (Python):
from sys import stdin

n,k = [int(x) for x in stdin.readline().rstrip().split()]

li = [stdin.readline().rstrip() for _ in range(n)]

li.sort()

print("".join(li))

Solution (Python):

def minimum_search(S):
    pass

if __name__ == '__main__':
    _ = list(map(int, input().split()))
    N, L = _[0], _[1]
    S = []
    for i in range(N):
        S.append(input())

    for i in range(N):
        temp=min(S)
        print(temp,end='')
        S.remove(temp)

Solution (Python):
n = list(map(int, input().split()))
count, lengch = n[0], n[1]
strings = [input() for i in range(count)]

strings.sort()
print("".join(strings))

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

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

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

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

Solution (Python):

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

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

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):
import itertools

NLinput = input()
NLinput = [int(x) for x in NLinput.split()]

N = NLinput[0]
L = NLinput[1]

S_list = []
for i in range(N):
    temp = input()
    S_list.append(temp)

S_list = sorted(S_list)
str_temp = ''
for i in S_list:
    str_temp += i
print(str_temp)

Solution (Python):
s=list(map(int,input().split()))
num =int(s[0])
length =int(s[1])
statements =list()
while num>0:
    statements.append(input())
    num -=1

statements.sort()

result =''.join(statements)

print(result)

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

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

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

ans = ""
for i in range(N):
  t = min(s)
  ans += t
  s.remove(t)

print(ans)

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

lis=[]
for j in range(n):
    minf=min(P)
    lis.append(minf)
    P.remove(minf)

c=str()
for i in range(n):
    c +=lis[i]

print(c)

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

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

s = sorted(s)

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

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 s in range(n):
  S.append(input())

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

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

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 = []
for _ in range(N):
    S.append(input())

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

Solution (Python):
m = input().split()
n = int(m[0])
l = []
for i in range(n):
    l.append(input())

l.sort()
final = ""
for j in range(len(l)):
    final += l[j]

print(final)

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

a_str_list = sorted(a)
ans = "".join(a_str_list)
print(ans)

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
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
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N,L=MI()
    S=[ST() for _ in range(N)]
    S.sort()
    print(*S,sep="")
if __name__ == '__main__':
    main()

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

print("".join(mylist))

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

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

s.sort()

s1=''.join(s)
print(s1)

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

Solution (Python):
import math

line = input()
n, l = [int(x) for x in line.split()]
strings = []
for i in range (n):
	strings.append(input())
strings.sort()
seperator = ''
print(seperator.join(strings))

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

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

print("".join(array))

Solution (Python):
nums = input().split()
N = int(nums[0])
L = int(nums[1])



count = 0
list = []

while count < N:
    list.append(input())
    count += 1

s_list = sorted(list)
print(''.join(s_list))

Solution (Python):
T = ()

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

S.sort()

T = ','.join(S)
T = T.replace(',','')

print(T)

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

s_data = sorted(data)
res = ""
for i in range(0,N):
  for item in s_data[i]:
    res += item

print(res)

Solution (Python):

import sys
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')

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

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

l.sort()

print(''.join(l))

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

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

Solution (Python):


N,L=list(map(int,input().split(" ")))
S=[] 

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


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

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

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

Solution (Python):

import sys, math, itertools, heapq, collections, bisect, fractions
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

n,l=map(int,input().split())
s=[input() for i in range(n)]
s.sort()
print(*s,sep='')

Solution (Python):


mylist=[]
mylist_int=[]
words=[]
sorted_words=[]
result=""


mylist=input().split()
mylist_int=[int(s) for s in mylist]



number=mylist_int[0]
length=mylist_int[1]

for i in range(number):
    words.append(input())
    
    
result=words 
    

sorted_words=sorted(words)





result="".join(sorted_words)
    
print(result)

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

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

Solution (Python):
a = list(map(int, input().split()))
s = [input() for i in range(a[0])]
newa= sorted(s)
moji =''
for x in newa:
    moji += x
print(moji)

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

Solution (Python):
NL=input().split()
N=int(NL[0])
L=int(NL[1])

S=[]
rank=[]
for i in range(N):
    S.append(input())
    rank.append(0)
temp=[]
for i in range(N):
    for j in range(N):
        if(S[i]<S[j]):
           temp.append(int(1))
        else:
            temp.append(int(0))        

for i in range(N*N):
    a=i%N
    rank[a]+=temp[i]
j=0
moji=""
for i in range(N):
    for j in range(N):
        if(i==rank[j]):
            moji=moji+S[j]
print(moji)

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

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())

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

sorted_strings = sorted(strings)

ans = ""
for string in sorted_strings:
    ans += string
print(ans)

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

ans = ''
for i in range(N):
    s.append(input())
s.sort()
for j in range(N):
    ans += s[j]
print(ans)

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

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

A    = sorted([input() for _ in range(N)])

print(*A, sep="")

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

main()

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

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

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

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

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

Solution (Python):


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

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

s = []

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

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

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