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

word_sort = sorted(word)

print("".join(word_sort))

Solution (Python):
def main():
 num = list(map(int,input().split()))
 value =  [input() for i in range(num[0])]
 value_sorted=sorted(value)
 print(''.join(value_sorted))

main()

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

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

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

for _ in range(N):
    S_hai.append(input())
    
sort_S = sorted(S_hai)

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

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

Solution (Python):
def main():
    n, l = map(int, input().split())
    S = list(input() for _ in range(n))

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

if __name__ == '__main__':
    main()

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

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

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

answer = "".join(sorted(wordlist))
print(answer)

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

answer = "".join(sorted(wordlist))
print(answer)

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

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

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

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

S.sort()
s = ''
for i in range(N):
    s += S[i]

print(s)

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 _ in range(N))
print(''.join(S))

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9+7
MAX = 10**18
MIN = -10**18

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

Solution (Python):
from sys import exit

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

ss = sorted(s)
ans=""
for i in range(n):
    ans +=ss[i]
print(ans)

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

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

s = list(sorted(s))

print(''.join(s))

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

Solution (Python):
from functools import reduce
n, l = (int(x) for x in input().split())
ss = [input() for i in range(n)]
ss.sort()
print(reduce(lambda x, y: x+y, ss))

Solution (Python):
N = input().split(" ")
a = int(N[0])
b = int(N[1])

l = []
for i in range(a):
    l.append(input())
 
l.sort()    
print("".join(l))

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

l2=sorted(l)

ans="".join(l2)
print(ans)

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

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

sorted_S = sorted(S)

string = ""
for str in sorted_S:
  string += str

print(string)

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

Solution (Python):


import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))

from collections import Counter
def resolve():
    N,L=pin()
    SS=[input() for i in range(N)]
    SS.sort()
    
    print(*SS,sep="",end='\n')

resolve()

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

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

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

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

lis.sort()
print("".join(lis))

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

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

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

N = x[0]
L = x[1]

ls_N = []

for i in range(N):
    n = input()
    ls_N.append(n)

ls_N = sorted(ls_N)




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

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

Solution (Python):

n, l = map(int, input().split())
words = []

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

words.sort()

print(''.join(words))

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

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

strs.sort()
print("".join(strs))

Solution (Python):
inputNL = input().split(" ")
N = int(inputNL[0])
L = int(inputNL[1])
 
inputs = []
for n in range(N):
  inputs.append(input())
 
inputs.sort()
answer = "".join(inputs)
print(answer)

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

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


if __name__ == "__main__":
    main()

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

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

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

st = []
for i in range(N):
    a = input()
    st.append(a)
s_st = sorted(st)
dic = ""
for j in range(len(s_st)):
    dic += s_st[j]
print(dic)

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

Solution (Python):
n,l=map(int,input().split())
s=[0]*n
for i in range(0,n):
  s[i]=str(input())
s.sort()
result="A"
for i in range(0,n):
  result=result+str(s[i])
result=result.lstrip("A")
print(result)

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

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

Solution (Python):

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

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

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

s = sorted(s)

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):
import sys
def input(): return sys.stdin.readline().strip()

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

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

orange = sorted(apple)
print("".join(orange))

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

s.sort()
ans = ''
for i, ss in enumerate(s):
  ans += ss
print(ans)

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

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

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

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

Solution (Python):



N,L = map(int,input().split())
mylist = []
for i in range(N):
  val = input()
  if val:
    mylist.append(val)
  else:
    break
    
s = ""  
mylist.sort()
for a in mylist:
  s += a
print(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())
 
S.sort()
str=''
for i in range(N):
  str=str+S[i]

print(str)

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

Solution (Python):
N, L = map(int, input().split())
S = [str(input()) for _ 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)
c=''
for i in range(N):
  c+=S[i]
print(c)

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

Solution (Python):

import re
import math
from collections import defaultdict
import itertools
from copy import deepcopy
import random
from heapq import heappop,heappush
import time
import os
import queue
import sys
import datetime
from functools import lru_cache

readline=sys.stdin.readline
sys.setrecursionlimit(2000000)

alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def is_power(a,b):
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def get_facs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None
def floor_(n,x=1):
    return x*(n//x)
def ceil_(n,x=1):
    return x*((n+x-1)//x)
def hani(x,min_,max_):
    ret=x
    if x<min_:ret=min_
    if x>max_:ret=max_
    return ret
def seifu(x):
    return x//abs(x)


def main():
    n,l=map(int,input().split())
    S=[]
    for a in range(n):
        S.append(input())
    S.sort()
    print("".join(S))
main()

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

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

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

Solution (Python):
def constructString(strs):
  return "".join(sorted(strs))

strs = []
n, l = map(int, input().split())
for _ in range(n):
  strs.append(input())
print(constructString(strs))

Solution (Python):
n, l = map(int, input().split())
i = 0
s = list()
while i<n:
    s.append(str(input()))
    i+=1

i=0
while i<n:
    w = "z"*l
    j = 0
    while j < n:
        if s[j] <w:
            x = j
            w = s[j]
        j+=1
    if i == 0:
        ans = w
    else:
        ans += w
    s[x] = "z"*l
    i += 1
print(ans)

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
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
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


n,l=MI()
lis=[input().rstrip() for i in range(n)]
u=sorted(lis)

print("".join(u))

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=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):
def nyu():
    H,W = map(int,input().split())
    S = [input() for _ in range(H)]
    S.sort()
    return S

S = nyu()
ans =""

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



print(ans)

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

s.sort()
s = ''.join(s)

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

s.sort()


print(''.join(s))

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

    Ssort = sorted(S)
    print("".join(Ssort))
resolve()

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

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

Solution (Python):
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N, L = list(map(int,_in[0].split(' ')))
    S_arr = []
    for i in range(N):
        _ =     _in[i+1]   
        S_arr.append(_)
    
    S_arr.sort()
    s = ''.join(S_arr)
    
    print(s)

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

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

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

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

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

for _ in range(N):
  words.append(input())
for i in sorted(words):
    t += i

print(t)

Solution (Python):
import sys

input = sys.stdin.readline
MOD = 1000000007

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

S = []
for _ in range(N):
    S.append(input()[:-1])

S.sort()

for i in range(N):
    print(S[i],end="")

print("")

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

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

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

Solution (Python):



import sys





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 LLI(rows_number): return [LI() for _ in range(rows_number)]


def solver(allNumber, eachStrings):
    result = ''
    
    eachStrings.sort()
    result = "".join(eachStrings)
    return result


if __name__ == "__main__":
    N, L = MI()
    SI = []
    for j in range(0, N):
        tmpStrList = list(map(str, sys.stdin.readline().split()))
        SI.append(tmpStrList[0])
    print("{}".format(solver(N, SI)))

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



if '__main__' == __name__:
    resolve()

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

sorted_list_S = sorted(list_S)
ans = ''.join(sorted_list_S)

print(ans)

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

lStr = [input() for i in range(lNL[0])]

lStr.sort()

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

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=[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_sorted = sorted(s)
ans = "".join(s_sorted)
print(ans)

Solution (Python):
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

n, l = na()
s = nsn(n)
s.sort()

print(*s, sep="")

Solution (Python):


def main():
    *N, = map(str, open(0).read().split())
    S = N[2:]
    L = int(N[1])
    N = int(N[0])

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


main()

Solution (Python):
import sys

def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]

def to_bin(x: int) -> str: return format(x, 'b') 
def to_oct(x: int) -> str: return format(x, 'o') 
def to_hex(x: int) -> str: return format(x, 'x') 
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]

from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left


def main():
    n, l = MII()
    ss = [IS() for _ in range(n)]
    ss.sort()
    print(''.join(ss))

if __name__ == '__main__':
    main()

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

s=[]
for i in range(n):
  
  s_tmp=input()
  s.append(s_tmp)
  
s.sort()
res=''.join(s)

print(res)

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())
sn = [input() for _ in range(N)]
sn.sort()
ans = ''
for s in sn:
    ans += 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() for i in range(N)]
ans = ""
for i in range(N):
    tmp = min(S)
    S.remove(tmp)
    ans += tmp

print(ans)

Solution (Python):


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



list = []

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

list = sorted(list)

ans = "".join(list)


print(ans)

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

strlist.sort()
ans = ''
for i in range(len(strlist)):
  ans = ans + strlist[i]

print(ans)

Solution (Python):
n,l = map(int, 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_li = [input() for _ in range(N)]
ans = ""
for s in sorted(s_li):
    ans += s
print(ans)

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 + s[i]
    
print(S)

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

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

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

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

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

words = []

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

sor_words =sorted(words)

for i in range(N):
    print(sor_words[i],end="")

Solution (Python):
import sys
readline = sys.stdin.readline

def main():
    N, L = map(int, readline().rstrip().split())
    S = [readline().rstrip() for _ in range(N)]
    S.sort()
    print(*S, sep='')

if __name__ == '__main__':
    main()

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):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

input_list=[]

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

input_list.sort()

out =''

for i in range(n):
    out += input_list[i]

print(out)

Solution (Python):

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

    slist.sort()
    print("".join(slist))

main()

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

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

Solution (Python):



import sys





def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(str, sys.stdin.readline().split()))


def LS(): return list(map(str, sys.stdin.readline().split()))


def LLI(rows_number): return [LI() for _ in range(rows_number)]


def solver(allNumber, eachStringList):
    result = ""
    
    eachStringList.sort(reverse=False)
    
    result = result.join(eachStringList)
    return result


if __name__ == "__main__":
    N, _ = MI()
    SI = []
    for j in range(N):
        tmpList = LS()
        SI.append(tmpList[0])
    print("{}".format(solver(N, SI)))

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

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

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

Solution (Python):



import sys





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 LLI(rows_number): return [LI() for _ in range(rows_number)]


def solver(allNum, longLeng, eachString):
    result = ''
    eachString.sort()
    result = "".join(eachString)
    return result


if __name__ == "__main__":
    N, L = MI()
    SI = []
    for _ in range(0, N, +1):
        getStrList = sys.stdin.readline().split()
        SI.append(getStrList[0])
    print("{}".format(solver(N, L, SI)))

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

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

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

print(*sorted([input() for _ in range(n)]), 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 =  list(map(int,input().split()))
listA = []
for i in range(N):listA.append(input())
listA.sort()
print("".join(listA))

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

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

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

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

Solution (Python):
def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    N, L = read_ints()
    S = []
    for _ in range(N):
        S.append(input().strip())
    S.sort()
    return ''.join(S)


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

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

Solution (Python):
number, length = map(int, input().split())

dict_list = []

for i in range(number):
 dict_list.append(input())

new_dict_list = sorted(dict_list)

answer = ''.join(new_dict_list)

print(answer)

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

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



if __name__ == '__main__':
    main()