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

Solution (Python):
def main():
  n, m = [int(x) for x in raw_input().split(' ')]
  strs = [raw_input() for x in xrange(n)]
  print(''.join(sorted(strs)))

main()

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

print(''.join(sorted([input() for i in range(n)])))

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

Solution (Python):
def main():

    N, L = map(int, input().split())
    w = []
    for _ in range(N):
        w.append(input())
    w.sort()
    return "".join(w)

if __name__ == '__main__':
    print(main())

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()
for a in S:
    print(a,end ="")

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

S_list.sort()
mojiretu = ""

for X in S_list:
    mojiretu += X

print(mojiretu)

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)]
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 = map(int, input().split())
s = sorted(str(input()) for k in range(n))
p = ""
for i in s:
    p+=i
print(p)

Solution (Python):
n, l = map(int, input().split())
s = sorted(str(input()) for k in range(n))
end = "".join(s)
print(end)

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())
print("".join(sorted([input() for _ in range(n)])))

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

Solution (Python):
n, l = (int(x) for x in 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 _ in range(n)])

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

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

a.sort()

print(''.join(a))

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 




 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N,L = inputMap()
    S = []
    for _ in range(N):
        tmp = input()
        S.append(tmp)
        
    S.sort()
    ans = ""
    for vol in S:
        ans += vol
        
    print(ans)
    
if __name__ == "__main__":
	main()

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

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

ss = [input() for i in range(NL[0])]

ss.sort()

print(''.join(ss))

Solution (Python):
num,long = map(int,input().split())
lines = [input() for i in range(num)]
lines.sort()
answer = ""
for line in lines:
    answer += line
print(answer)

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

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

l_str=[]
for _ in range(n):
  a=input()
  l_str.append(a)
  
l_str.sort()
ans=''.join(l_str)
print(ans)

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

Solution (Python):
a,b=map(int,input().split())
str_list=[input() for i in range(a)]
maped_list=str_list.sort()
maped_list = map(str, str_list) 
mojiretu = ''.join(maped_list)
print(mojiretu)

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

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

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

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

Solution (Python):


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

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

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

Solution (Python):
if __name__ == "__main__":
    n, l = map(int, input().split())

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

    print("".join(sorted(sl)))

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

print(''.join(sort_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("".join(s))

Solution (Python):
n,l=input().split()
n,l=int(n),int(l)
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())
a=[]
b=''
for k in range(n):
    a.append(input())
a.sort()
for i in range(n):
   b+=a[i]
print(b)

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

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(i) for i in input().split()]
array=[]

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

  
array.sort()

print("".join(array))

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

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

list = [str(input()) for i in range(a)]

print(''.join(map(str, sorted(list))))

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

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

print(sum)

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

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

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

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

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

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

Solution (Python):
s=input()
list=[]
num=s.split(' ')[0]
for i in range(int(num)):
    list.append(input())
new_list=sorted(list)
print(''.join(new_list))

Solution (Python):
N, L = [int(y) for y in input().split(' ')]
arr = sorted([input() for x in range(N)], reverse=False)

print(''.join(arr))

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

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

Solution (Python):
nl = input().split()
n = int(nl[0])
l = int(nl[1])
s = []

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

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



print(s)

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

result.sort()
print(*result,sep="")

Solution (Python):

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

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

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

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

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

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())
strings = [input() for _ in range(N)]
strings.sort()
print(''.join(strings))

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())
slist = [input() for i in range(n)]

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

print(ans)

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

print(''.join(lt))

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())
a = []
b = ''

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

for i in range(len(a)):
  b += a[i]
print(b)

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


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

str.sort()

str_sort = str[0]

for s in str[1:]:
  str_sort = str_sort + s
  
print(str_sort)

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

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

s.sort()
for i in s:
    print(i, end="")

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

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

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

data=[]
for n in range(int(N)):
    data.append(input())
  
iroha=""
A=sorted(data)
for i in A:
    iroha+=i
    
print(iroha)

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

data.sort()
for n in range(N):
  print(data[n],end='')

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

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

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

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

x = sorted([ input() for i in range(n) ])
print(''.join(x))

Solution (Python):
inputted = input().split(" ")
N=int(inputted[0])
L=int(inputted[1])
s = [input() for i in range(N)]
s.sort()
print("".join(s))

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

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

Solution (Python):
N, L = map(int, input().split())
ans = []
for _ in range(N):
    ans.append(input())
print(''.join(sorted(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=[]
for i in range(n):
  s.append(input())
s.sort()
for j in range(n-1):
  print(s[j],end="")
print(s[n-1])

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

Solution (Python):
num_list = list(map(int, input().split()))
S = [input() for i in range(num_list[0])]
S2 = sorted(S)
print(*S2, sep='')

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

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

sorted_list_input = sorted(list_input)


for j in range(N):
    print(sorted_list_input[j], end="")
print("")

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

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

Solution (Python):


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

sorted_S = sorted(S)

print("".join(sorted_S))

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

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

X.sort()

ans = ''
for i in range(N):
    ans += X[i]

print(ans)

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

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



S.sort()



ans = "".join(S)

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 = [input().rstrip() for i in range(n)]
print(''.join(sorted(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 =map(int,input().split())
list=[input() for i in range(n)]
s=sorted(list)
print("".join(s))

Solution (Python):
n,l=map(int,input().split())
s = list(input() for i in range(n))
s=sorted(s)
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):


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

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

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

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

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

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

print(''.join(sorted(a)))

Solution (Python):
num,strings = map(int,input().split())
result = ""
str_array = []

for i in range (num):
    str_array.append(input())

str_array.sort()

for x in range (num):
    result = result + str_array[x]

print(result)

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

words = list()
for i in range(N):
  words.append(input())
  
words.sort()

print(*words,sep ="")

Solution (Python):
import sys
from fractions import gcd
import bisect
 
stdin = sys.stdin
 
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n, l = na()
st = []
for i in range(n):
        st.append(ns())
st.sort()
print(*st, 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())
dl=[input() for i in range(n)]
for i in sorted(dl):
  print(i,end="")
print()

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

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

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

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

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

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

w_list = []
for _ in range(S):
  w_list.append(input())
w_list.sort()
w = "".join(w_list)
print(w)

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

Solution (Python):
def B_IrohaLovesStrings():
    N, L = map(int, input().split())
    S = [input() for x in range(N)]
    S.sort()
    print(*S, sep="")
    
if __name__ == "__main__":
    B_IrohaLovesStrings()

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

Solution (Python):
N,L = [int(_) for _ in 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 = 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())
lis=[]
for _ in range(n):
    s=input()
    lis.append(s)
lis.sort()
print("".join(lis))

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

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

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

Solution (Python):
inp = input().split(" ")
N = int(inp[0])
L = int(inp[1])
s = []
for i in range(N):
  	s.append(input())
s.sort()
res = ""
for i in range(N):
	res += s[i]
print(res)

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

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 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()
print(*S, sep = '')

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

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

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

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.sort()
ans = ""
for s in S:
  ans += s
print(ans)

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

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

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

s_list = sorted(s_list)

print(*s_list, sep='')

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

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

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

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 = list(map(int,input().split()))
s = [input() for i in range(n)]
s.sort()
temp = ''.join(s)
print(temp)

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

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

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())
word_list = [input() for i in range(n)]

word_list.sort()
ans = 0

for word in range(n):
    for letter in range(l):
        if ans == 0:
            ans = word_list[word][letter]
        else:
            ans = "{0}{1}".format(ans, word_list[word][letter])

print(ans)

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

str_lists.sort()

result_str = ''
for j in str_lists:
    result_str += j

print(result_str)

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 = [input() for _ in range(N)]
for s in sorted(S):
    print(s,end='')

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

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

a=[]

for i in range(n):
  
  
  a.append(str(input()))

a.sort()

result=""
for item in a:
  result=result+item
print(result)

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

print("".join(sorted(li)))

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

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

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

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

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

list=[]
for i in range(1,N+1,1):
    list.append(input())
    list.sort()
mozi="".join(list)

print(mozi)

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

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

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

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,l = map(int, input().split())
s = sorted(input() for k in range(n))
print("".join(s))

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):
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 = []

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

s.sort()

print(''.join(s))

Solution (Python):
N, L = map(int, input().split())
li = []
for i in range(N):
  li.append(input())
li.sort()
print (''.join(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())
List = sorted([input() for i in range(n)])
print("".join(List))

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

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

for s in range(len(S)):
    ans += S[s]
print(ans)

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

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

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

Solution (Python):
N,L = map(int, input().split())
List = [input() for n in range(N)]
print(''.join(sorted(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())
sList = []

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

sList.sort()

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

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

Solution (Python):
list01 = str(input()).split()

N = int(list01[0])
L = int(list01[1])

chara = list()

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

chara.sort()

new_str = ''.join(chara)

print(new_str)

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

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().rstrip("\n").split())
strings = sorted([input().rstrip() for _ in range(n)])

print("".join(strings))

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

text_list = [input() for i in range(n)]
text_list.sort()

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

Solution (Python):
_,_,*s = open(0).read().split()
print(*sorted(s),sep='')

Solution (Python):
N,L,*s = open(0).read().split()
print("".join(sorted(s)))

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

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

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

resolve()

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())
words.sort()
for i in range(n):
  print("{}".format(words[i]),end="")