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):
nums = input().split()
N = int(nums[0])
L = int(nums[1])
s = []
for i in range(N):
    s.append(input())
sorteds = sorted(s)
ans = ''
for seq in sorteds:
    ans += seq
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 = ['x' for x in range(N)]
for i in range(N):
	S[i] = input()
S.sort()
for s in S:
	print(s,end='')
print()

Solution (Python):


N, L = [int(x) for x in input().strip().split(' ')]
S = []
for _ in range(N):
    S.append(input().strip())
S.sort()
print(''.join(S))

Solution (Python):

n, l = map(int, raw_input().split())
a = []
for i in xrange(n):
  a.append(raw_input())
a.sort()
print "".join(a)

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

res = sorted(S)

print("".join(res))

Solution (Python):
n, l = map(int,input().split())
s = []
for i in range(n):
    s.append(input())
for i in range(len(s)-1):
    for j in range(len(s)-1):
        if s[j] > s[j+1]:
            s[j], s[j+1] = s[j+1], s[j]
for i in s:
    print(i, end = "")

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

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

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

main()

Solution (Python):
nl = [int(i) for i in input().split(" ")]
str_list = []
for _ in range(nl[0]):
    str_list.append(input())

for word in sorted(str_list):
    print(word,end="")

print()

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

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

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

Solution (Python):

n,l = map(int,raw_input().split())
s = ['']*n
ans = ''
for i in range(n):
    s[i] = raw_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 tmp in range(n) ]
s.sort()
print(''.join(s))

Solution (Python):
n = int(input().split()[0])
s = [input() for i in [0]*n]
s.sort()
print("".join(s))

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

Solution (Python):
print("".join(sorted([input()for _ in[""]*int(list(map(int,input().split()))[0])])))

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

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

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

Solution (Python):
import sys

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

word.sort()

for i in range(n):
  sys.stdout.write(word[i])

print()

Solution (Python):
n, str_len = [int(e) for e in input().split()]
strs = [input() for _ in range(n)]


def main(n, str_len, strs):
    ordered_strs = sorted(strs)
    return ''.join(ordered_strs)


print(main(n, str_len, strs))

Solution (Python):
import sys

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

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


if __name__ == '__main__':
    solve()

Solution (Python):
n,_=map(int,input().split())
a=sorted([input() for _ in [0]*n])
print(*a,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)]
print(''.join(sorted(s)))

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

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

Solution (Python):
import sys
n,l=[int(i) for i in input().split()]
s=[]
for i in range(n):
    s.append(input())
s.sort()
for i in s:
    sys.stdout.write(i)
print()

Solution (Python):



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

for _ in range(N):
    input_data = input()
    ls.append(input_data)

ls.sort()
print(''.join(ls))

Solution (Python):


def main():
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    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 = []

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

for i in range(n-1):
	for j in range(n-1,i,-1):
		if s[j-1] > s[j]:
			s[j],s[j-1] = s[j-1],s[j]

print(*s,sep='')

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

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


def main():
    n,l = list(map(int,input().split()))
    a = [input() for _ in range(n)]
    a.sort()
    return ''.join(a)



print(main())

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

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

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

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


s.sort()


for i in range(n):
    s[i] = "".join(s[i])
s = "".join(s)

print(s)

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys

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

S.sort()
ret = ''
for s in S:
    ret += s[0:L]
print ret

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

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

S.sort()

str = ""

for s in S:
    str += s

print(str)

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)]
S.sort()
print("".join(S))

Solution (Python):
n, l = list(map(int, input().split()))
l = list()
while(n):
	l.append(input())
	n -= 1
l.sort()
print("".join(l))

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

a = sorted(a)
ans = ''
for i in a:
    ans += i
print ans

Solution (Python):


N, L = map(int, raw_input().split())
S = [raw_input() for _ in xrange(N)]
S.sort()
print ''.join([n for n in S])

Solution (Python):
N, L = map(int, raw_input().split())
S = [raw_input() for _ in xrange(N)]


S.sort()

print ''.join([n for n in S])

Solution (Python):
import heapq
N, L = map(int, raw_input().split())
hq = []
for _ in xrange(N):
    s = raw_input()
    heapq.heappush(hq, s)
ans = ''
while len(hq) > 0:
    ans += heapq.heappop(hq)
print ans

Solution (Python):

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

Solution (Python):
n,l=map(int,raw_input().split())
s=[raw_input() for _ in xrange(n)]
s.sort()
ans=""
for i in xrange(n):
    ans+=s[i]
print(ans)

Solution (Python):

import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

N, L = map(int, raw_input().split())
print "".join(sorted([raw_input() for i in xrange(N)]))

Solution (Python):
def read():
    return int(input())

def reads(sep=None):
    return list(map(int, input().split(sep)))

def main():
    n, l = reads()
    s = [input() for _ in range(n)]
    print(''.join(sorted(s)))

main()

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

Solution (Python):
print("".join(sorted([input() for x in range(list(map(int, input().split()))[0])])))

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

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

lis2 = sorted(lis)

for x in lis2:
    print(x, end="")
print()

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

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

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

sort_Ss = sorted(Ss)
joined_Ss = ''.join(sort_Ss)

print joined_Ss

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

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


if __name__=="__main__":
    solve()

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

Solution (Python):
n,ll = map(int,raw_input().split())
var = []
i = 0
while (n > 0):

    var.append(raw_input())
    l = len(var[i])
    if l > ll:
        exit
    i = i + 1
    n = n - 1
var.sort()
print ''.join(var)

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

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

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

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


def main():
    solve()


if __name__ == '__main__':
    main()

Solution (Python):
import re
import doctest


class IO_for_Contest(object):
    @staticmethod
    def my_input():
        
        return input()

    @staticmethod
    def read_from_input():
        n, l = IO_for_Contest.read_n_int(2)
        raw_s = []
        for x in range(n):
            raw_s.append(IO_for_Contest.read_line())
        return list(map(lambda x: x[0:l], raw_s))

    @staticmethod
    def read_line():
        return IO_for_Contest.my_input().strip()

    @staticmethod
    def read_int():
        return int(IO_for_Contest.my_input().strip())

    @staticmethod
    def read_n_int(n):
        return list(map(
                int,
                re.split('\s+', IO_for_Contest.my_input().strip())))[: n]


def solve():
    a = IO_for_Contest.read_from_input()
    a.sort()
    print(''.join(a))

if __name__ == '__main__':
    
    solve()

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

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

word.sort()
print ''.join(word)

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

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

Solution (Python):
n,l=map(int,raw_input().split())
s=[raw_input() for _ in xrange(n)]
s.sort()
ans=""
for i in xrange(n):
    ans+=s[i]
print(ans)

Solution (Python):
a = ""
n, l = map(int, raw_input().split())
s = []
for i in xrange(0, n):
	s.append(raw_input())

s.sort()
for i in xrange(0, n):
	a = a +s[i]

print a

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

array.sort()

print ''.join(array)

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

for i in range(N-1):
    start = N - 1
    
    for j in range(start-i):
        
        Left = String[start-j-1]
        Right = String[start-j]
        if Left > Right:
            String[start-j-1] = Right 
            String[start-j] = Left

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

Solution (Python):
import sys

def main(lines):
    print(''.join(sorted(lines.split())))

next(sys.stdin)
lines = ''
for line in sys.stdin:
    lines += line
main(lines)

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

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, raw_input().split())
S = [raw_input().split() for _ in range(N)]
r = ''
for i in sorted(S):
    r += i[0]
print r

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

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

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

str=""
for x in l:
	str+=x

print(str)

Solution (Python):



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

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

Solution (Python):
N,L=map(int, input().split())
a=[]
for i 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("".join(S))

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

Solution (Python):



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

print("".join(sorted([input() for i in range (ini[0])])))

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

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

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

Solution (Python):
print ''.join(sorted([raw_input() for i in range(int(raw_input().split()[0]))]))

Solution (Python):



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

if __name__ == "__main__":
    main()

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

Solution (Python):
N = int(input().split()[0])
words = [input().strip() for i in range(N)]
print("".join(sorted(words)))

Solution (Python):
n, l = map(int, raw_input().split())
print "".join(sorted(raw_input() for i in xrange(n)))

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

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=input().split()
print("".join(sorted(input()for i in range(int(N)))))

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

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

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

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

Solution (Python):
import sys
f = sys.stdout.write
n,l=map(int,input().split())
s = [];
for _ in range(n):
	s.append(input())
s.sort()
for i in range(n):
	f(s[i])

Solution (Python):


N, L = map(int, raw_input().split(" "))
lst = []
ans = ""
for i in xrange(0,N):
    S_i = raw_input()
    lst.append(S_i)
lst.sort()
for i in lst:
    ans += i
print ans

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

Solution (Python):
ans = ""

def get_input():
    flag = 1
    cnt = 0
    while True:
        if flag == 1:
            N,L = input().split()
            flag = 0
            continue
        else:
            a = input()
            yield ''.join(a)
            cnt += 1
            if cnt >= int(N):
                break

if __name__ == "__main__":
    array = list(get_input())
    array.sort()

    for i in range(0,len(array)):
        ans += array[i]

    print(ans)

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

Solution (Python):






import math
line=raw_input().rstrip().split(' ')
N=int(line[0])
L=int(line[1])
listo=[]
for i in range(N):
    listo.append(raw_input().rstrip())
listi=sorted(listo)
listni=''
for i in range(N):
    listni+=listi[i]
print listni

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

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

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

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

l = []

for i in range(n):
	l.append(raw_input())

l.sort()

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

print s

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

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

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

Solution (Python):
import numpy as np

N,L = map(int,raw_input().split())
s = []

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

print reduce((lambda a, b : a + b), np.sort(s))

Solution (Python):
N, L = (raw_input().split())

S = []

ans = ""

for i in range(int(N)):
  S.append(raw_input())

S.sort()

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

print ans

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

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

out=""
for s in sorted(strs):
	out+=s
print(out)

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

Solution (Python):
l = raw_input().split()


a = []
for i in range(int(l[0])):
    a.append(raw_input())

a.sort()

print ''.join(a)

Solution (Python):
def read():
    return map(int, input().split())

n, l = read()
s = []
for _ in range(n):
    s.append(input())
print(''.join(sorted(s)))

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

b=sorted(a)
ans=''.join(b)
print(ans)

Solution (Python):
catch = input()
catch = catch.split(" ")
N = int(catch[0])

S = []

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, raw_input().split())
s = [raw_input() for i in range(n)]
ans = ""
print "".join(sorted(s))

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

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

Solution (Python):


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

S = []

for i 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(''.join(s))

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

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

s.sort()
for t in s:
    print(t, end='')
print()

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

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

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

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

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, raw_input().split())
s = sorted([raw_input() for i in xrange(N)])
print "".join(s)

Solution (Python):
N, _ = [int(x) for x in 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))