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: Runtime Error

Solution code:
a = list(map(int, input().split()))
b = []
for i in sys.stdin:
  b.append(i)

b.sort()

c = ""
for j in b:
  c += j

print(c)

Submission status: Runtime Error

Solution code:
s=input()
a=[]
for i in s:
	if i == 'B':
      if x:
		a.pop()
	else:
		a.append(i)
print(''.join(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

st.sort()
  
print(''.join(st))

Submission status: Runtime Error

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

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

st.sort()
ans = ''

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

Submission status: Runtime Error

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

st = []
for _ in range(n):
  st.append(input())

st.sort()
ans = ''

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,K = map(int, input().split())
lst = []
for z in range(K):
    lst.append(input())
lst.sort()
print("".join(lst))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, l = map (int, input().split())
s = sorted(input() for i in ratnge(n))
print(*s, sep='')

Submission status: Runtime Error

Solution code:
N = int(input().splice()[0])
L = int(input().splice()[1])
Ss = []

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

for i, a in enumerate(Ss):
  key = a
  j = i - 1

  while j >= 0 and Ss[j] > a:
    Ss[j + 1] = Ss[j]
    j = j - 1

  Ss[j + 1] = key

print(' '.join(Ss))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(ret)

Submission status: Runtime Error

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

print("".joint(p))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
print(''.join(sorted(input() for _ in range(int(input())))))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


list = []

for i in range(b):
  list.append(input())
  
list.sort()
print(join(list))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

words.sort()
print(''.join(words))

Submission status: Runtime Error

Solution code:
num = int(input().split())

str = input()
strc = ''
for i in range(num[0]-1):
  strc = input()
  if str > strc:
    str = strc + str
  else:
    str = str + strc
print(str)

Submission status: Runtime Error

Solution code:
num = int(input().split())

str = ''
strc = ''
for i in range(num[0]-1):
  strc = input()
  if str > strc:
    str = strc + str
  else:
    str = str + strc
print(str)

Submission status: Runtime Error

Solution code:
num = int(input().split())
str = ''
strc = ''
for i in range(num[0]):
  strc = input()
  if str > strc:
    str = strc + str
  else:
    str = str + strc
print(str)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
ln=map(str(input()) for _ in range(n))
ln.sort()
print("".join(ln))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
ln=map(str(input())for _ in range(n))
ln.sort()
print("".join(ln))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
ln=map(int(input())for _ in range(n))
ln.sort()
print("".join(ln))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
ln=map(int(input())for _ in range(n))
ln.sort()
for l in ln:
    ans="".join(l)
print(ans)

Submission status: Runtime Error

Solution code:
N, _ = [int(i) for i in input().split()]
S = [input() for _ in range(N)]
ans = "".join(sorted(s))
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
lists = []
for i in range(a):
  lists.add(input())

print(lists.sort.join(''))

Submission status: Runtime Error

Solution code:
ip1 = input().split()
N = int(ip1[0])
L = int(ip1[1])
strings = []
for i in range(N):
    strings.append(input())
strings.sort()
ans = ""
for i in range(len(strings)):
    ans += string[i]

print(ans)

Submission status: Runtime Error

Solution code:
N, L = gets.split.map(&:to_i)
arr = []
N.times do
  arr.push(gets.chomp)
end
arr.sort!
print arr.join

Submission status: Runtime Error

Solution code:
N, x = list(map(int, input().split()))
li = sorted(list(map(int, input().split())))
res = 0
for i  in li:
    x -= i
    if x < 0:
        break
    else:
        res += 1
if x > 0:
    res -= 1

print(res)

Submission status: Runtime Error

Solution code:
N, x = list(map(int, input().split()))
li = sorted(list(map(int, input().split())))
print(li)
res = 0
for i  in li:
    x -= i
    if x < 0:
        break
    else:
        res += 1
if x > 0:
    res -= 1
print(res)

Submission status: Runtime Error

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

res = "".join(lix)
print(res)

Submission status: Runtime Error

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

print("".join(lix))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input().split()
b=int(a[0])
data = [input() for i in range(+1)]
sort(data)

for j in data:
    c=c+j
    
print(c)

Submission status: Runtime Error

Solution code:
a=input().split()
b=int(a[0])
data = [input() for i in range(b)]
sort(data)

for j in data:
    c=c+j
    
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input().rstrip().split()
N=int(a[0])
L=int(a[1])
l=[]

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

l.sort()

ans=""
for i in range(N):
    ans+=l[i]
print(ans)

Submission status: Runtime Error

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

s.sort()
ans = 0
while range(n + 1):
    ans += s[n]

Submission status: Runtime Error

Solution code:
n, l = (int(x) for x in input().split())
while range(n + 1):
    s = list(x for x in input.split())

s.sort()
ans = 0
while range(n + 1):
    ans += s[n]

Submission status: Runtime Error

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

s.sort()
ans = 0
while range(n + 1):
    ans += s[n]

Submission status: Runtime Error

Solution code:
N , L = map(int,input().sqlit())
S.list()
for i in range(N):
  S.append(input())
S.sort()
for i in range(S):
  print(i)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
c =[]
for i in range(b-1):
    c.append(str(input()))
c = sorted(c)
mojiretu = ''
for x in c:
    mojiretu += x
print(mojiretu)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

A    = sorted([input for _ in range(N)])

print(*A, sep="")

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))
for i in 0 to X[0]
    A.append(input())

result = ''.join(A)
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
arr_len_int = int(input().split(' ')[1])
if (arr_len_int==1):
  print(input())
else:
  a = [input() for i in range(arr_len_int)]
  a.sort()
  print(''.join(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s = []

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

s.sort()

print(*s, sep='')

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
mat=[]
for i in range(n):
    mat.append(list(input()))
mat.sort(key=lambda x:x)
ans=''
for i in mat:
    ans+=i 
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
l = int(input())
ln = []

for i in range n:
  ln.append(input())
  
ln.sort()

s = ""

for word in ln:
  s += word
  
print(s)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
length, count = list(map(int, input().split()))

words = []
for i in range(count):
  s = input()
  if len(s) != length:
    continue
  words.append(s)

words = sorted(words)

r = ''.join(words)
print(r)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
length, count = list(map(int, input().split()))

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

words = sorted(words)

r = ''.join(words)
print(r)

Submission status: Runtime Error

Solution code:
print("".join(sorted([input() for i in range(int("{}".format(input().split().pop(-1))))])))

Submission status: Runtime Error

Solution code:
# ABC042B - 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition)
def main():
    N, L, A = map(int, open(0).read().split())
    A.sort()
    print("".join(A))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
# ABC042B - 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition)
def main():
    N, L, A = map(int, open(0).read().split())
    A.sort()
    print("".join(map(str, A)))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
input_line = input().split()
list_str = []
ans_str = ''
for i in range(int(input_line[1])):
  list_str.append(input())
list_str.sort()
for i in list_str:
  ans_str += i
print(ans_str)

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin
N, L = int(F.readline().rstrip().split())
a = [F.readline() for x in range(N)]

a.sort()
answer = ''.join(a)
print(answer)

Submission status: Runtime Error

Solution code:
# At Beginner Contest 042 B (200)
n, l = map(int, input().split())
S = []
for _ in range(n):
    S.append(input())

out = []
min_ = float("inf")
min_idxs = list(range(len(S)))
pos = 0
while S:
    new_min = []
    for i in min_idxs:
        s = S[i]
        ch = ord(s[pos])
        if ch < min_:
            min_ = ord(s[pos])
            new_min = [ i ]
        elif ch == min_:
            new_min.append(i)
    if len(new_min) == 1:
        out.append(S[new_min[0]])
        del S[new_min[0]]
        min_idxs = list(range(len(S)))
        pos = 0
    else:
        pos += 1
        min_idxs = new_min
    min_ = float("inf")

r = "".join(out)
print(r)

Submission status: Runtime Error

Solution code:
N, L = input().split()
string_list = [input() for i in range(int(N))]
string_list.soted()
ans = ''
for i in string_list:
    ans += i

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
L = input()
A = list(map(str, input().split()))
A.sort()

res = ''
for a in A:
    res += a

print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
n, l = map(int, input().split())
s = list()
for _ in range(n):
  s.append(input())
  s.sort()
print('{}{}{}'.format(s[0],s[1],s[2]))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,L=map(int,input().split())

list=soeted([input() for i in range(N)])
print(*list,sep="")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sequtils, strutils, algorithm

let
  nl = stdin.readline.split.map(parseInt)
  ss = newSeqWith(nl[0], stdin.readline).sorted(cmp)

echo ss.join("")

Submission status: Runtime Error

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

print("".joined(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

def resolve():
    num, long = list(input().split())
    string = sorted([input for i in range(num)])
    print(*string, sep="")

if __name__ == '__main__':
    resolve()

Submission status: Runtime Error

Solution code:
n=int(input().split()[0])
print(join(sorted([input()for _ in[0]*n])))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(*sorted(S), sep='')

Submission status: Runtime Error

Solution code:
N,L = map(int,input().split())
 
for n in range(int(N)):
    data.append(input())
 
 
    
result=sorted(data)
result

Submission status: Runtime Error

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

for n in range(int(N)):
    data.append(input())


    
result=sorted(data)

Submission status: Runtime Error

Solution code:
test=sorted(list(input().split()))



print(test[0]+test[1]+test[2])

Submission status: Runtime Error

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

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

a.sort()

c = ''

for x in a:
    
    c = c+x
    

print(str(c))

Submission status: Runtime Error

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

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

a.sort()

c = ''

for x in a:
    c = c+x
    

print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
strings,num = map(int,input().split())
result = ""
str_array = []

for i in range (num):
    str_array.append(input())

str_array.sort()

for i in range (num):
    result += str_array[i]

print(result)

Submission status: Runtime Error

Solution code:
strings,num = map(int,input().split())
result = ""
str_array = []

for i in range (strings):
    str_array.append(input())

str_array.sort()

for i in range (num):
    result += str_array[i]

print(result)

Submission status: Runtime Error

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

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

print(*words,sep ="")

Submission status: Runtime Error

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

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

print(*words,sep ="")

Submission status: Runtime Error

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

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

print(*words,seq ="")

Submission status: Runtime Error

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

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

print(*words,seq ="")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

li.sort()
"""
for st in li :
  s += st
print(s)
"""
print(*li,sep="")

Submission status: Runtime Error

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

s=""
li.sort()
for st in li :
  s += st
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s_list = sorted(s_list)

print('{}{}{}'.format(s_list[0], s_list[1], s_list[2]))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N, L = map(int, input().split())
# 文字列用のリスト
s = []
# L回分のインプットを受け入れる
for i in range(L):
	s.append(input())
# リストの昇順の並び替え
s.sort()
# 出力
print(''.join(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import itertools
N,L,*s = open(0).read().split()
x = list(map(lambda x:"".join(x), itertools.permutations(s, int(N))))
min_str = x[0]
for s in x[1:]:
  if s < min_str:
    min_str = s
print(min_str)

Submission status: Runtime Error

Solution code:
N = input()
a = []
s = ""
for i in range(N):
    b = raw_input()
    a.append(b)
a.sort()
for i in range(N):
    s += a[i] 
print s

Submission status: Runtime Error

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

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

print(*s,sep)

Submission status: Runtime Error

Solution code:
i = input().split()
s, t = map(int, i)
str_list = []

for i in range(3):
    string = input()
    str_list.append(string)

str_list.sort()
ans = ''.join(str_list)

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

#print( N )
#print( L )

str_set = []
for i in range( L ):
  str_set.append( input() )
#print( array )

sorted_str = ""
for s in sorted( str_set ):
  sorted_str += s
print( sorted_str )

Submission status: Runtime Error

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

str_set = set()
for i in range( L ):
  str_set.add( input() )

sorted_str = ""
for s in sorted( str_set ):
  sorted_str += s
print( sorted_str )

Submission status: Runtime Error

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

#print( N )
#print( L )

str_set = set()
for i in range( L ):
  str_set.add( input() )
#print( array )

sorted_str = ""
for s in sorted( str_set ):
  sorted_str += s
print( sorted_str )

Submission status: Runtime Error

Solution code:
array_temp = input.split()
N = array[0]
L = array[1]
strs = array[2:]
strs.sort()
print(strs)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

alpha = [chr(ord('a') + i) for i in range(26)]
# print(alpha)

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

scores = []

for word in P:
    score = 0
    for t in word[0]:
        score += alpha.index(t)
    scores.append({"word": word[0], "score": score})

sorted_dict_list = sorted(scores, key=lambda x:x['score'])

out_str = ""
for d in sorted_dict_list:
    out_str += d["word"]
print(out_str)

Submission status: Runtime Error

Solution code:

alpha = [chr(ord('a') + i) for i in range(26)]
# print(alpha)
N, L = map(int, input().split())
P = [input().split() for i in range(L)]

scores = []

for word in P:
    score = 0
    for t in word[0]:
        score += alpha.index(t)
    scores.append({"word": word[0], "score": score})

sorted_dict_list = sorted(scores, key=lambda x:x['score'])

out_str = ""
for d in sorted_dict_list:
    out_str += d["word"]
print(out_str)

Submission status: Runtime Error

Solution code:
_=input()
s=input().split().sort()
print(reduce(+,s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(N):
  S.append(input())
S.sort()
ans="".join(S)
print(ans)