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

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

Submission status: Accepted

Solution code:
#coding: utf-8
#ABC042B

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

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

Submission status: Accepted

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

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:
# coding: utf-8
# Here your code !

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, L = map(int, raw_input().split())
S = [raw_input() for i 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())
S.sort()
print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python2
#encoding: UTF-8

# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
N,L=map(int,input().split())
# N,L= 3,3
strs=[input() for i in range(N)]
# strs=["dkx","acx","axx"]
out=""
for s in sorted(strs):
	out+=s
print(out)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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


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

a.sort()

print ''.join(a)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

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="")

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 = map(int, raw_input().split())
l = []
for _ in range(N):
    l.append(raw_input().strip())
print "".join(sorted(l))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding :utf-8                                                                                                                                              
N, L = map(int, raw_input().split())
s = sorted([raw_input() for i in xrange(N)])
print "".join(s)

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
println(join(sort!(readlines()[2:end])))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sortli=sorted(li)
print("{}{}{}".format(sortli[0],sortli[1],sortli[2]))

Submission status: Runtime Error

Solution code:
from sys import stdin, stdout
from time import perf_counter

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

import sys
sys.stdout = open("e:/cp/output.txt","w")
sys.stdin = open("e:/cp/input.txt","r")



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

Submission status: Runtime Error

Solution code:
from sys import stdin
input = stdin.readline

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

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

D.sort()

print(''.join(D))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,l = map(int,input().split())
ls = []
for i in range(n):
  a = str(input())
  ls.append(a)
ls.sort()
tx = ""
for i in range(n):
  tx = tx +ls[n]

print(tx)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!

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

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

l = sorted(l)
new_l = ''.join(l)
print(new_l)

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

int main()
{   int n,l;
    cin>>n>>l;
    string str[n], temp;
    getchar();
    for(int i = 0; i < n; ++i)
    {
      getline(cin, str[i]);
    }

    for(int i = 0; i < n-1; ++i)
       for( int j = i+1; j < n; ++j)
       {
          if(str[i] > str[j])
          {
            swap(str[i],str[j]);
          }
    }


    for(int i = 0; i < n; ++i)
    {
       cout << str[i];
    }
    return 0;
}

Submission status: Runtime Error

Solution code:
# bsdk idhar kya dekhne ko aaya hai, khud kr!!!
# import math
# from itertools import *
# import random
# import calendar
import datetime
# import webbrowser

# f = open("input.txt", 'r')
# g = open("output.txt", 'w')
# n, m = map(int, f.readline().split())

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

Submission status: Runtime Error

Solution code:
5 5 7
Yes
N,L = map(int,input().split())
str_list=[]
final_str = ""
for i in range(N):
    str_list.append(input())
new_list = sorted(str_list)
for n in range(N):
    final_str += new_list[n]
print(final_str)
3 3

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

C.sort()

i=0

while i < N:
    print(C[i] , end ="")
    i += 1

Submission status: Runtime Error

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

C = list(range(N))

i=0

while i < N:
    C[i] = input()
    
    if len(C[i]) == L:
       i += 1
    else:
       pass

C.sort()

i=0

while i < N:
    print(C[i] , end ="")
    i += 1

Submission status: Runtime Error

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

C = list(range(N))

i=0

while i < N:
    C[i] = input()
    i += 1

C.sort()

i=0

while i < N:
    print(C[i] , end ="")
    i += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,l = map(int,input().split())
s =[input() for _ in range(n)]
ss = sorted(s)
print(ss[0]+ss[1]+ss[2])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
first= input()
first = first.split()

N = int(first[0])
L =[]
for i in range(N)
  s = input()
  L.append(s)
  
L.sort()
for i in L:
  print(i,end="")

Submission status: Runtime Error

Solution code:
first= input()
first = first.split()

N = int(firsst[0])
L =[]
for i in range(N)
  s = input()
  L.append(s)
  
L.sort()
for i in L:
  print(i,end="")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
str_list = []
n_number,l_length = map(int,input().split())
w_1=input()
str_list.append(w_1)
w_2=input()
str_list.append(w_2)
w_3=input()
str_list.append(w_3)


str_list.sort()
print(''.join(str_list))

Submission status: Runtime Error

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

print(''.join(S))

Submission status: Runtime Error

Solution code:
Firstline = input()
Firstline = Firstline.split()

List = []
for i in int(Firstline[0]):
  List.append(input())

List.sort()
s = ""
for i in List:
  s += i

print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

             
print(a

Submission status: Runtime Error

Solution code:
# 入力
N,L = list(map(int, input().split()))
S = []
for _ in range(N):
    S.add(str(input()))

# 出力
print(''.join(sorted(S)))

Submission status: Runtime Error

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

import sys


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


def _main():
	input()
    s = sorted(list(input().split()))
    print("".join(s))


if __name__ == "__main__":
    _main()

Submission status: Runtime Error

Solution code:
def lexi():
    n, l = [int(i) for i in input().split()]
    arr = []

    for i in range(n):
        arr.append(input(i))
    a = arr.sorted()
    ans = ''.join(a)
    print(ans)

lexi()

Submission status: Runtime Error

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

str_list = [input() for _ in range(N)]

str_list.sort()

a = str_list[0]
b = str_list[1]
c = str_list[2]

print(a+b+c)

Submission status: Runtime Error

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

str_list = [input() for _ in range(N)]

str_list.sort()

a = str_list[0]
b = str_list[1]
c = str_list[2]

print(a+b+c)

Submission status: Runtime Error

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

s.sort()
S = ""
for i in s:
    S += i
print(S)

Submission status: Runtime Error

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

ss.sort()
print(str.join(ss))

Submission status: Runtime Error

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

sum_ = ''
for s in S:
    sum_ += s

print(sum_)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

print("axxcxxdxx")

Submission status: Runtime Error

Solution code:
record = sorted([input() for i in range(int(input().split()[1]))])
print("".join(record))

Submission status: Runtime Error

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

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

print(''.join(mylist))

Submission status: Runtime Error

Solution code:
n,l=(int(x) for x in input().split())
sente1=input()
sente2=input()
sente3=input()
mylist=[sente1,sente2,sente3]
mylist.sort()
a=''.join(mylist)
print(a)

Submission status: Runtime Error

Solution code:
l,n=(int(x) for x in input().split())
sente1=input()
sente2=input()
sente3=input()
mylist=[sente1,sente2,sente3]
mylist.sort()
print(''.join(mylist))

Submission status: Runtime Error

Solution code:
n,l=(int(x) for x in input().split())
sente1=input()
sente2=input()
sente3=input()
mylist=[sente1,sente2,sente3]
mylist.sort()
print(''.join(mylist))

Submission status: Runtime Error

Solution code:
#ABC042B
l,n=(int(x) for x in input().split())
sente1=input()
sente2=input()
sente3=input()
mylist=[sente1,sente2,sente3]
mylist.sort()
print(''.join(mylist))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
c=input()
s=[]
for i in range(N):
    s.append(input())
s.sort()
print("".join(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:
n,l = map(int,input(),split())
s = [input() for _ in range(n)]
s.sort()
for k in s:
  print(k, end ="")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s = [list(int(input())) for i in range(l)]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

strs.sort()
print(''.join(strs[:n]))

Submission status: Runtime Error

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

s.sort()

ans=s[0]
for i in range (1,n):
  ans+=s[i]
  
print(ans)

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:
# -*- coding : utf-8 -*-

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

L = list([input() for i in range(n)])
L.sort()
word = ""

for i in len(L):
  word = word + L[i]

print(word)

Submission status: Runtime Error

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

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

L = list(map(int, [input() for i in range(n)]))
L.sort()
word = ""

for i in len(L):
  word = word + L[i]

print(word)

Submission status: Runtime Error

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

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

L = map(int, [input() for i in range(n)])
L.sort()
word = ""

for i in len(L):
  word = word + L[i]

print(word)

Submission status: Runtime Error

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

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

L = map(int, [input() for i in range(n)])

word = ""
for i in len(L):
  L.sort()
  word = word + L[0]
  L = L.remove(L[0])

print(word)

Submission status: Runtime Error

Solution code:
N,L=map (str(), input().split())
a=［str(i) for i in input().split()］
b=a.sort(a)
c=b.join()
print(c)

Submission status: Runtime Error

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

b=''
for i in range(n):
  b+=n_s[i]

print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = list(map(int, input().split()))
string = [input() for s in range(N[1])]
string.sort()
print(''.join(string))

Submission status: Runtime Error

Solution code:
N = list(map(int, input().split()))
string = [input() for s in range(N[1])]
string.sort()
print(string)

Submission status: Runtime Error

Solution code:
n,l  = list(map(int, input().split()))
ln = []
for n in range(l):
    ln.append(input())
output = ''
for i in sorted(ln):
    output += i
print(output)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#文字列大好き
n,l = map(int, input().split())
s=[input() for _ in range(n)]

s=s.sort()
print(''.join(s))
#ans=''
#for i in s:
#    ans=ans+i

#print(ans)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

"""
Lの文字列N個(s1-sN)
N個の文字列を辞書順にしたあと，くっつけて出力する
"""


def main():
    l, n = map(int, input().split())
    input_list = []

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

    result_list = sorted(input_list)
    print("".join(result_list))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

"""
Lの文字列N個(s1-sN)
N個の文字列を辞書順にしたあと，くっつけて出力する
"""


def main():
    l, n = map(int, input().split())
    input_list = []

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

    result_list = sorted(input_list)
    print("".join(result_list))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
a=input().split(" ")
list1=[]

for i in range(int(a[0])):
	b=input()
	list1.append(b)

list2=sorted(list1)

for j in range(int(a[0])+1):
	c=c+list2[j]

print(c)

Submission status: Runtime Error

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

s = [input() for i in range(int(N))]

result = ""
for i in sorted(s):
  result = result + i
print(result)

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
  numbers = input().split(' ')
  N = int(numbers[0])
  L = int(numbers[1])
  # print(N, L)
  words = [input()]

  for i in range(N - 1):
    # word2 = input()
    length = len(words)
    new_word = input()
    for j in range(length):  # (1)
      word = words[j]
      for l in range(L):
        if ord(new_word[l]) < ord(word[l]):
          if j == 0:
            words.insert(0, new_word)  # スペースをつけておく
          else:
            words.insert(j, new_word)
          flag = False
          break
        elif ord(new_word[l]) > ord(word[l]):
          flag = True
          break
        else:
          continue
      if flag:
        if j == length - 1:
          words.append(new_word)
        continue  # (1)のcontinue
      else:
        break  # (1)のbreak

concat = ''
for i in range(len(words)):
  concat += words[i]
print(concat)