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 = []
count = 0
while N > count:
    S = input()
    word.append(S)
    count += 1

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

print(ans)

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

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

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

Solution (Python):
main = list(map(lambda x: int(x), input().split()))
n, l = main[0], main[1]
final = []
for i in range(n):
    string = input()
    final.append(string)

final.sort()
print(''.join(final))

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

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

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

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

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

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

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

ans = ''
for i in range(n):
  ans += S[i]
  
print(ans)

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

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

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= [int(x) for x in input().split()]
la = []
for i in range(n):
  la.append(str(input()))
la.sort()
print("".join(str(x) for x in la))

Solution (Python):

import sys
input=sys.stdin.readline

def main():
    n,l = map(int,input().split())
    words=[]
    words=[input().rstrip() for _ in range(n)]
    s_words=sorted(words,key=lambda x:x[0:])
    ans=""

    for s_word in s_words:
        ans+=s_word
    print(ans)
if __name__=="__main__":
    main()

Solution (Python):
nl = list(map(int,input().split()))
N = nl[0]
L = nl[1]
ss = [input() for i in range(N)]
ss.sort()
res = ""
for i in ss:
  res = res+i
print(res)

Solution (Python):
_, _, *S = open(0).read().split()
print("".join(sorted(S)))

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

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

a.sort()

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

Solution (Python):



from math import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq














import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7


INF = float('inf')
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())
n,l = readInts()
lis = [input() for _ in range(n)]
lis = sorted(lis)
print(''.join(lis))

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

print(*sl, sep='')

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

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

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

Solution (Python):
from typing import List


def answer(n: int, l: int, s: List[str]) -> str:
    return ''.join(sorted(s))


def main():
    n, l = map(int, input().split())
    s = [input() for _ in range(n)]
    print(answer(n, l, s))


if __name__ == '__main__':
    main()

Solution (Python):
n,l = map(int,input().split())
s = [input() for _ in range(n)]
an = ''
for _ in range(n):
    an += min(s)
    s.remove(min(s))
print(an)

Solution (Python):
from collections import Counter
import math
import statistics
import itertools
a,b=map(int,input().split())











lis=[input() for i in range(a)]
ra=a-1
for i in range(ra):
    for k in range(ra-i):
        if lis[k]>lis[k+1]:
            a=lis[k]
            lis[k]=lis[k+1]
            lis[k+1]=a
print("".join(lis))

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

Solution (Python):
import math
from datetime import date

def main():
		
	line = input().split()
	n = int(line[0])
	k = int(line[1])


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

	ans = "";
	for x in sorted(a):
		ans += x

	print(ans)
	
main()

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

w.sort()

print("".join(w))

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

sorted_list = sorted(text_list)

print(''.join(sorted_list))

Solution (Python):


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


if __name__ == "__main__":
    main()

Solution (Python):
N, L = map(int,input().split())
l = list()
for i in range(N):
	l.append(input())
print(*sorted(l),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):
def main():
    N, L = map(int, input().split())
    Sn = [input() for i in range(N)]
    Sn2 = sorted(Sn)
    ans = ""
    for val in Sn2 :
        ans = ans + val
    print(ans)

if __name__ == '__main__':
    main()

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

S = sorted(S)


print(''.join(S))

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

Solution (Python):
N,L=list(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())

S.sort()

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

print(result)

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

S_sorted = sorted(S)
Word = ''.join(S_sorted)

print(Word)

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

print("".join(S))

Solution (Python):



from math import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq














import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7


INF = float('inf')
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())
n,l = readInts()
S = sorted([input() for _ in range(n)])
print(''.join(S))

Solution (Python):
n, l = map(int, input().split())
sl = list(input() for _ in range(n))
sl_s = sorted(sl)

print(*sl_s, sep='')

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

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

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 = [str(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)])
for s in S:
  print(s,end="")

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

Solution (Python):
N,L,*Ss =open(0).read().split()

ans = ""
for s in sorted(Ss):
  ans+=s
print(ans)

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

if __name__ == "__main__":
    main()

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

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

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

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

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

lst = []

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

lst.sort()

ans = ''

for s in lst:
   ans += s

print(ans)

Solution (Python):
from sys import stdin, stdout
from time import perf_counter

import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7





n,l = map(int,input().split())
a = [input() for item in range(n)]
b = sorted(a)
print(''.join(b))

Solution (Python):


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

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):
    array = input()
    S.append(array)


S.sort()


S=''.join(S)


print(S)

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

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

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

Solution (Python):

import sys


def resultSur97(x):
    return x % (10 ** 9 + 7)


if __name__ == '__main__':
    
    nl = list(map(int, input().split()))     

    x = nl[0]
    sList = [input() for _ in range(x)]

    
    sListSorted = sorted(sList)
    out = ""
    for s in sListSorted:
        out += s

    
    print("{}".format(out))

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

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

sortli=sorted(li)
print(''.join(sortli))

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

strList = []
for _ in range(0, n):
    strList.append(input())

strList.sort()

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

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

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

Solution (Python):
if __name__ == "__main__":
	N, L = map(int,input().split())
	di = list()
	for i in range(N):
		di.append(input())
	copy = sorted(di)
	ans =''.join(copy)
	print(ans)

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

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

ans.sort()


print("".join(ans))

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

ss.sort()

print(''.join(ss))

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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush
import collections
import bisect

def main():
    n,l = map(int, input().split())
    array = [input() for _ in range(n)]

    array.sort()
    print(''.join(array))


if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math


sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N,L = inm()
S = []
for _ in range(N):
    S.append(input())

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

Solution (Python):
N, L = map(int, input().split())
S_i = [input() for i in range(N)]
m = ""
for x in sorted(S_i):
    m += x
else:
    print(m)

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

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

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect














import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7


from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
n,l = readInts()
s = [input() for _ in range(n)]
s = sorted(s)
print(''.join(map(str,s)))

Solution (Python):
n, l = map(int, input().split())
S = [str(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):
def LI():
    return list(map(int, input().split()))


def LSH(h):
    return [input() for _ in range(h)]


N, L = LI()
S = LSH(N)
S.sort()
S = ''.join(S)
print(S)

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

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

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

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

Solution (Python):
from sys import stdin, stdout
from time import perf_counter

import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7





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

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

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

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

print("".join(S))

Solution (Python):
info = input().split()
lst = []
for i in range(int(info[0])):
  lst.append(str(input()))
lst = "".join(sorted(lst))
print((lst))

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

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

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

res.sort()

print(''.join(res))

Solution (Python):
if __name__ == '__main__':
    n, l = [int(x) for x in input().split(' ')]
    S = [input() for i in range(0, 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 = list(input() for i in range(n))
s.sort()
print(''.join(s))

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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 i in range(n)]
ans = ''
for i in range(n):
    ans += S.pop(S.index(min(S)))
print(ans)

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

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

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

if __name__ == "__main__":
    solve()

Solution (Python):




def resolve():
    import sys
    input = sys.stdin.readline

    n, l = [int(x) for x in input().rstrip().split(" ")]

    s_list = [input().rstrip() for _ in range(n)]
    s_list = sorted(s_list)
    print("".join(s_list))


if __name__ == "__main__":
    resolve()

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

Solution (Python):

import sys


def solve(N: int, L: int, S: "List[str]"):
    return "".join(sorted(S))



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    L = int(next(tokens))  
    S = [next(tokens) for _ in range(N)]  
    print(solve(N, L, S))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

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

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

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

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

d=sorted(c)  
print(''.join(d))

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

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

for i in range(N):
    D.append(input().strip())
D.sort()
print(''.join(D))

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n, l = rm()
s = sorted([rr() for _ in range(n)])
print(*s, sep='')

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

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

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

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

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

print("".join(sorted(x)))

Solution (Python):
import sys



def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    N, L = input_int_list()
    S = []
    for _ in range(N):
        S.append(input())
    S = sorted(S)
    print("".join(S))

    return


if __name__ == "__main__":
    main()

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

print("".join(s))

Solution (Python):
import sys
n,k = map(int, sys.stdin.readline().rstrip("\n").split())
l = [line.rstrip("\n") for line in sys.stdin]
l.sort()
s = ''.join(l)
print(s)

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

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

Solution (Python):
import sys

N, L = map(int, sys.stdin.readline().split())
S = []
for _ in range(N):
    S.append(sys.stdin.readline().strip())

S.sort()
ans = ""
for s_i in S:
    ans += s_i

print(ans)

Solution (Python):


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

S_sorted = sorted(S)
ans = "".join(S_sorted)
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=[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(*s,sep="")

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

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

print(a)

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

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

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

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

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

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

l.sort()
print("".join(l))

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

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

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

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

Solution (Python):



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


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):

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

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

l = sorted(data)
ans = ''

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

print(ans)

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

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

Solution (Python):


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

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

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

def find_where( List , word ):
    flag = 1
    for i , list_i in enumerate(List):
        if list_i > word:
            flag = 0
            break
    return i + flag

def main():
    n , l = map( int, input().split() )
    I = []
    for i in range(n):
        s = str(input())
        s = s[:-1]
        I.append( s )
    Ss = []
    Ss.append( I[0] )

    for i in range(1,n):
        s = I[i]
        where_i = find_where( Ss , s )


        Ss.insert( where_i , s )

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

main()

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

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

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

Solution (Python):



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


main()

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

print("".join(sorted(str_list)))

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

Solution (Python):





import datetime






n, k = map(int, input().split())
arr = []
for i in range(n):
    arr.append(input())
arr.sort()
print("".join(arr))

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

for n in range(N):
  a = input()
  A.append(a)
  
A.sort()
print(''.join(A))

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

Solution (Python):
n,l = list(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())
w = [input() for i in range(N)]
ans = ""
s_w = sorted(w)
for i in range(N):
    ans += s_w[i]
print(ans)

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

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

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

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

print(''.join(s))

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


if __name__ == '__main__':
    main()

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

print(*S, sep="")

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

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

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

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

seq = []

for i in range(N):
    seq.append(input())
    seq = sorted(seq)

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

print(ans)