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

words = [input() for _ in range(N)]

words.sort()

print(''.join(words))

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

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().strip().split(' '))
print(''.join(sorted([input().strip() for _ in range(N)])))

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

Solution (Python):
N,L,*S = map(str,open(0).read().split())
S.sort()
print("".join(S))

Solution (Python):
inStr = input()
splitStr = inStr.split()
N = int(splitStr[0])


S = list(range(N))

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

S.sort()

for i in range(N):
    print("%s" %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 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(*s,sep="")

Solution (Python):

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


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

list_a.sort()

list_b = "".join(list_a)

print(list_b)

Solution (Python):


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

s.sort()
ans = ""
for ele in s:
    ans += ele

print(ans)

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

Solution (Python):



input_moji = input().split()
mojiretsu = int(input_moji[0])
mojikosuu = int(input_moji[1])
s=""

input_list = [input() for i in range(mojiretsu)]
input_list.sort()

for i in input_list:
    s = s+i
print(s)

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

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

print(''.join(sorted(l)))

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

input_str_list = []
for input_str_index in range(N):
    input_str_list.append(input())

input_str_list.sort()

print(''.join(input_str_list))

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

input_str_list = []
for input_str_index in range(N):
    input_str_list.append(input())

input_str_list.sort()

print(''.join(input_str_list))

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 range(N):
    ans += S[i]
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())
dic_l = [input() for i in range(1,n+1)]
print("".join(sorted(dic_l)))

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

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

ans = ""
for i in moji_sort:
    ans += i
print(ans)

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

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


if __name__ == "__main__":
    resolve()

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

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

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

for _ in range(n):
  s.append(input())
  
s.sort()
print(''.join(s))

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

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

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

Solution (Python):

N,L = list(map(int,input().split()))
lst = [input() for i in range(N)]
lst.sort()
print("".join(lst))

Solution (Python):
n,l=input().split();print("".join(sorted(eval("input(),"*int(n)))))

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

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

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

S.sort()

ans = ''

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

print(ans)

Solution (Python):
N, L = (int(x) for x in input().split())
S = ['' for i in range(N)]
for i in range(N):
    S[i] = input()
else:
    S.sort()
    ans = ''
    for i in range(N):
        ans += S[i]
    else:
        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 = list(input() for _ in range(n))
s.sort()
for i in range(n):
  print(s[i], end='')
print()

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

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

def list_to_str(input_list):
    string = ""
    for i in input_list:
        string += i

    return string

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

print(list_to_str(sorted(s)))

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

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

data.sort()

for i in data:
  print(i, 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=[]
for c in range(n):
    s.append(input())
s.sort()
print("".join(s))

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

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

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

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

s.sort()

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

print("")

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

print("".join(S))

Solution (Python):
n,m= 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 = []
ans = ""
for i in range(N):
  S.append(input())
S.sort()
for i in range(len(S)):
  ans += S[i]
print(ans)

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

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

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

s.sort()

out = ''

for i in s:
    out += i

print(out)

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

words_sorted = sorted(words)
new_words = "".join(words_sorted)
print(new_words)

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

ans = Sn.pop(Sn.index(min(Sn)))
for i in range(N-1):
  ans+=Sn.pop(Sn.index(min(Sn)))
print(ans)

Solution (Python):


n = list(map(int, input().split()))
s_list = []
for i in range(0, n[0]):
    s_list.append(input())
s_list = sorted(s_list)

s = ""
for i in range (0, len(s_list)):
    s += s_list[i]

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

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(input())
  
S = sorted(S)

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

print("".join(S))

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

c = sorted(s)
ans =''.join(c)
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())
jisho=[]
for i in range(N):
    array = input()
    jisho.append(array)
print("".join(sorted(jisho)))

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




lst = []

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

print(''.join(lst))

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

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

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

s = list()
for _ in range(n):
    s.append(input())

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

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

s = ""
for i in range(N):
  temp = min(Li)
  Li.remove(temp)
  s += temp
print(s)

Solution (Python):
n,l=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 = 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(*List,sep='')

Solution (Python):

import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

N, L = ISI()
a = ""
s = sorted([IS() for _ in range(N)])
for i in range(N):
    a += "".join(s[i])
print(a)

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=map(int,input().split())
ans =[]
for _ in range(n):
    ans += [input()]
ans.sort()
print(''.join(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())
a = [0] * 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 = [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):
if __name__ == '__main__':
    N, L = map(int, input().split())
    S = []
    for i in range(N):
        S.append(input())
    S.sort()
    t = ""
    for S_i in S:
        t += S_i
    
    print(t)

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

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

words.sort()
print("".join(words))

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

print(ans)

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

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

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

ans.sort()

print(''.join(ans))

Solution (Python):
n = input().split()

num = [int(z) for z in n ] 
f = num[0]
s = num[1]

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

s_words = sorted(words)

j_s_words = "".join(s_words)
print(j_s_words)

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

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
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())
words = []
for i in range(N):
  words.append(input())
words.sort()
for word in words:
  print(word, end='')

Solution (Python):
import sys

stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n, l = na()
li = [input() for i in range(n)]
li.sort()
print("".join(li))

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

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

Solution (Python):
import numpy as np
x=input()
x=x.split(' ')
y=[]
for i in range(int(x[0])):
    y.append(input())

y.sort()
print(''.join(y))

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

s = [list(map(str,input().split())) for i in range(m[0])]
a=''
s.sort()
for i in range(m[0]):
  a=a+''.join(s[i]) 
print(a)

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

Solution (Python):
a_list=[]
N, L = map(int, input().split())
for a in range (N):
    a_list.append(input())
    
new_list=sorted(a_list)
string=""
for word in new_list:
    string+=str(word)
print(string)

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

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

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

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

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

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

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

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

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

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

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

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

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

str.sort()

print(''.join(str))

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())
li = sorted(list(input() for _ in range(N)))
print(''.join(li))

Solution (Python):
N, L = input().split()
s = [input() for x in range(int(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()
print("".join(s))

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


if __name__ == "__main__":
    test()

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