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.



Sample input:
3 3
dxx
axx
cxx


Sample output:
axxcxxdxx

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    N, L = map(int, input().split())
    A = [input().strip() for _ in range(N)]
    A = sorted(A)

    return ''.join(A)


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

Submission status: Accepted

Solution code:
n,l=(int(x) for x in input().split())

mojil=[]

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

mojil.sort()

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

Submission status: Accepted

Solution code:
N, L = list(map(int, input().split()))
s = [input() for i in range(N)]
s.sort()
ans = ''
for i in s:
    ans += i
print(ans)

Submission status: Accepted

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

for i in range(N):
    s = input()
    S.append(s)
S.sort()
for i in S:
    A += i
print(A)

Submission status: Accepted

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

Submission status: Accepted

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

s.sort()
for i in s:
    ans += i

print(ans)

Submission status: Accepted

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

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

order=sorted(s)
ans=''.join(order)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

sorted_list = sorted(input_list)
comb_str = "".join(sorted_list)
print(comb_str)

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-
n,l=map(int,input().split())
s=[]

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

f=sorted(s)
ans=''.join(f)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#42
n, l = map(int, input().split())
a = []
for i in range(n):
    a.append(input())
a = sorted(a)
ans = ""
for i in range(n):
    ans += a[i]
print(ans)

Submission status: Accepted

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

strings.sort()
s=''
for i in strings:
    s += i

print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
input1=stdin.readline().rstrip().split()
N=int(input1[0])
L=int(input1[1])
input=[]
for n in range(N):
  input.append(stdin.readline().rstrip())

input.sort()
output=""
for i in range(len(input)):
  output+=input[i]

print(output)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, L=map(int, input().split())
m_list=list(input() for i in range(N))

new_list=sorted(m_list)


print("".join(new_list))

Submission status: Accepted

Solution code:
N, L =map(int, input().split())
a =[input() for _ in range(N)]
a.sort()
print ("".join(a))

Submission status: Accepted

Solution code:
N,L=map(int,input().split())
N=[0]*N
for i in range(len(N)):
    N[i]=input()
N_s=sorted(N)
print(''.join(N_s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nl = list(map(int, input().split()))

s = []

for i in range(0, nl[0]):
    s.append(input())

s.sort()

print(''.join(s))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 一行目　
n, l = map(int, input().split())

# 二行目以降
# for i in range(h):
lines = sorted([str(input()) for i in range(n)])

test = ""
for line in lines:
    test += line

print(test)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, _ = [int(_) for _ in input().split()]
words = []
for _ in range(n):
    words.append(input())
print("".join(sorted(words)))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
letters = []
for i in range(a):
    c = input()
    letters.append(c)
letterss = sorted(letters)
mojiretsu = ''
for x in letterss:
    mojiretsu += x
print (mojiretsu)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-

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

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

s.sort()

print(*s,sep="")

Submission status: Accepted

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

print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-
n,s =map(int,input().split())
 
s = [str(input()) for i in range(n)]
s.sort()

print(*s, sep="")

Submission status: Accepted

Solution code:
n,l=map(int,input().split())
a=[]
for i in range(n):
    a.append(input())
for j in range(n):
    for i in range(j):
        if a[i]>a[j]:
            b=a[i]
            a[i]=a[j]
            a[j]=b
for i in range(1,n):
    a[0] += a[i]
print(a[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, L = map(int, input().rstrip().split())
S = [input() for _ in range(N)]
S.sort()
print(*S, sep="")

Submission status: Accepted

Solution code:
def iroha_loves_strings(N: int, L: int, S: list) -> str:
    return ''.join(sorted(S))


if __name__ == "__main__":
    N = 0
    N, L = map(int, input().split())
    S = [input() for _ in range(N)]
    ans = iroha_loves_strings(N, L, S)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

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

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

Submission status: Accepted

Solution code:
n,l=input().split()
lists=[]
n=int(n)
for i in range (0,n):
  lists.append(input())
lists.sort()
li=''.join(lists)
print(li)

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()

for aa in a:
  print(aa, end="")

Submission status: Accepted

Solution code:
N,L=map(int, input().split())
l=[input() for i in range(N)]
l.sort()
print(*l,sep="")

Submission status: Accepted

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

S = []
for s in range(N):
    S.append(input())

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

Submission status: Accepted

Solution code:
n,l=map(int,input().split())
A=[input() for i in range(n)]
A.sort()
ans=""
for j in range(n):
  ans += A[j]
  
print(ans)

Submission status: Accepted

Solution code:
line = input().split(sep=" ")
strnum= int(line[0])
len = int(line[1])

input_str=[]

for i in range(strnum):
	line = input()
	input_str.append(line)

for i in sorted(input_str):
	print(i,end="")

Submission status: Accepted

Solution code:
i,m = map(int,input().split(" "));
str_list=[];
for _ in range(i):
	str_list.append(input());
str_list=sorted(str_list);
print("".join(str_list));

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
hoge=[]
for i in range(n):
  hoge.append(input())
hoge.sort()

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

Submission status: Accepted

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

s_sorted = sorted(s)



print("".join(s_sorted))

Submission status: Accepted

Solution code:
def main():
    N, L = map(int, input().split())
    S = []
    strings = ""
    for i in range(N):
        S.append(input())
    S.sort()
    for j in S:
        strings += j
    print(strings)
main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,b = map(int, input().split())
a = []

for i in range(N):
    d = input()
    a.append(d)
    
g = sorted(a)
print(''.join(g))

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline
N, L = [int(x) for x in input().rstrip().split()]
S = [input().rstrip() for _ in range(N)]
S.sort()
print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, L = list(map(int, input().split()))
words = ['']*N
for i in range(N):
	words[i] = input()

words.sort()

ans = ''
for word in words:
	ans += word

print(ans)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
mod = 1000000007


#A
"""
a = LI()
i = a.count(5)
j = a.count(7)
if i == 2 and j == 1:
    print("YES")
else:
    print("NO")
"""

#B
n,l = LI()
s = SR(n)
s.sort()
for i in s:
    for j in i:
        print(j,end = "")
print()
#C
"""
def check(n):
    n = list(map(int,list(str(n))))
    s = 0
    for i in n:
        s += f[i]
    return s == 0
n,k = LI()
d = LI()
f = [0 for i in range(10)]
for i in d:
    f[i] = 1
while 1:
    if check(n):
        print(n)
        quit()
    n += 1
"""
#D
"""
def f(x,y):
    return fact[x-1+h-y]*fact[y-1+w-x]*inv_fact[x-1]*inv_fact[y-1]*inv_fact[w-x]*inv_fact[h-y]%mod
h,w,a,b = LI()
fact = [1]*(h+w+1)
for i in range(h+w):
    fact[i+1] = fact[i]*(i+1)%mod
inv_fact = [0]*(h+w+1)
inv_fact[h+w] = pow(fact[-1],mod-2,mod)
for i in range(h+w)[::-1]:
    inv_fact[i] = inv_fact[i+1]*(i+1)%mod
ans = 0
for i in range(1,min(w-b,h-a)+1):
    ans += f(b+i,a+i)
    ans %= mod
print(ans)
"""


#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Accepted

Solution code:
from functools import reduce

def main():
    # 一文字のみを読み込み
    # s = input().rstrip().split(' ')
    
    # スペース区切りで標準入力を配列として読み込み
    # s = input().rstrip().split(' ')

    # 位置文字ずつ標準入力を配列として読み込み
    # s = list(input().rstrip())
    slist = input().rstrip().split(' ')
    N = int(slist[0])
    L = int(slist[1])
    S = []
    ans = ''
    for i in range(0,N):
        S.append(input().rstrip())
    S.sort()
    for i in range(0,N):
        ans = ans + S[i]
    print(ans)
   
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_list = input().split()
N = int(input_list[0])
wordList = list()

for i in range(0,N):
	wordList.append(input())
wordList = sorted(wordList)

answer = ""
for i in range(0,N):
	answer = answer + wordList[i]
print(answer)

Submission status: Accepted

Solution code:
def main():
    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='')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,L = map(int,input().split())
Ss = [input() for s in range(N)]
Ss.sort()
print("".join(Ss))

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

char_list = []

for dummy in range(N):
    S = str(input())
    char_list.append(S)

char_list = sorted(char_list)
answer = ""
for char in char_list:
    answer += char

print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,l=map(int,input().split())
ans=[]
for i in range(n):
  s=list(input())
  ans.append(s)
ans.sort()
answer=""
for i in ans:
  p="".join(i)
  answer+=p
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

w = [input() for i in range(n)]

w = sorted(w)

ans = ''

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

Submission status: Accepted

Solution code:
n,l = map(int, input().split())
print(''.join(sorted([input() for _ in '1'*n])))

Submission status: Accepted

Solution code:
n,l = map(int, input().split())
s = [input() for _ in '1'*n]
print(''.join(sorted(s)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: UTF-8

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

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

strs.sort()
print(''.join(strs))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3.4
# -*- coding: utf-8 -*-
# abc042_b

# input
N, L = map(int, input().split())
S = [input() for _ in range(N)]
# getans
ans = sorted(S)
# output
print(*ans, sep='')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3.4
# -*- coding: utf-8 -*-
# abc042_b

# input
N, L = map(int, input().split())
S = [input() for _ in range(N)]
# getans
ans = ''.join(sorted(S))
# output
print(ans)

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
s=''
a=[input()for i in range(n)];a.sort()
for i in range(n):s+=a[i]
print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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

    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

S.sort()

print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,l = map(int, input().split())
a = [input() for i in range(n)]
b = sorted(a)
k = ""
for j in range(n):
  k = k+b[j]
print(k)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, L = map(int, input().split())
S = []
for n in range(N):
    S.append(input())
print("".join(sorted(S)))

Submission status: Accepted

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

list.sort();
for str in list:
    print(str, end = '')

Submission status: Accepted

Solution code:
L = [int(x) for x in input().split()]
S=[]
for i in range(L[0]):
    s = input()
    S.append(s)
S.sort()
final=''
for i in S:
    final=final+i
print(final)

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
from operator import itemgetter
#以下てんぷら
def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
#n = ip()                                     #入力整数1つ
x,y= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
a=[input() for i in range(x)]    #入力セット(整数改行あり)(2/2)

#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
#こっから本文
a.sort()
print(''.join(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
N,L=map(int,input().split())
s=[input() for _ in range(N)]

s = sorted(s)
def concat(a,b):
    return a+b

print(reduce(concat,s))

Submission status: Accepted

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

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

S = sorted(S)
ans = ""

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

Submission status: Accepted

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

ss = sorted(ss)
print("".join(ss))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#8:20
num, length = map(int, input().split())
words = [input() for word in range(num)]
sort = sorted(words)
word = "".join(sort)
print(word)

Submission status: Accepted

Solution code:
N, L = [ int(x) for x in input().split() ]
Ss = [ input() for _ in range(N) ]

Xs = Ss
Xs.sort()
ans = "".join(Xs)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
""" AtCoder """

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

S.sort()

print("".join(S))

Submission status: Accepted

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


t.sort()
print(''.join(t))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,L = [int(n) for n in input().split()]
S = sorted([str(input()) for _ in range(N)])
print("".join(S))
# a =
# S = str(input())
# L = len(S)
# T = str(input())

Submission status: Accepted

Solution code:
n, l = [int(i) for i in input().split(' ')]
words = [input() for _ in range(n)]

words = sorted(words)

result = ''

for word in words:
    result += word
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
list = []
for i in range(a):
  word = input()
  list.append(word)
  
c = sorted(list)
d = ""
for j in range(a):
  d += c[j]
print(d)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,l=[int(i) for i in input().split()]
s=[input() for i in range(n)]
s.sort()
text=""
for i in range(n):
    text+=s[i]
print(text)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
N, L = map(int, input().split())
S = []
for _ in range(N):
    S.append(input())
print(''.join(sorted(S)))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Iroha Loves Strings(ABC Edition)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,l=map(int,input().split())
li=[input() for _ in range(n)]
li.sort()
ans=""
for i in range(n):
    ans+=li[i]
print(ans)

Submission status: Accepted

Solution code:
import fileinput

def main(str_list):
    str_list.sort()
    result = ""
    for s in str_list:
        result += s
    print(result)

if __name__ == '__main__':
    str_list = []
    for line in fileinput.input():
        str_list.append(line.rstrip())
    main(str_list[1:])

Submission status: Accepted

Solution code:
#042B
n,l=map(int,input().split())
a=[]
for i in range(n):
	a.append(input())

a.sort()
#print(a)
l=''
for i in a:
	l+=str(i)

print(l)

Submission status: Accepted

Solution code:
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="")
print("")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, L = map(int, input().split())
lst = []
for i in range(N):
    lst.append(input())
lst = sorted(lst)
for s in lst:
    print(s, end = "")
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,L = map(int,raw_input().split())

S = [raw_input() for i in range(N)]

S.sort()

print ''.join(S)

Submission status: Accepted

Solution code:
com=input().split()
data=[]
for i in range(int(com[0])):
    data.append(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(','.join(S).replace(',',''))

Submission status: Accepted

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

l = []

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

l.sort()

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

print()

Submission status: Accepted

Solution code:
n, l = list(map(int, input().split()))
ss = []
for _ in range(n):
    ss.append(input())
ss.sort()

ans = ''
for s in ss:
    ans += s

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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