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

S.sort()
print(sum(S))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
str = input().split()
v=""
sa=list()
for i in range(int(str[1])):
    sa.append(input()[:int(str[0])])
sa.sort()
for i in sa:
    v=v+i

print(v)

Submission status: Runtime Error

Solution code:
str = input().split()
v=""
sa=list()
for i in range(int(str[1])):
   sa.append(input().strip())
sa.sort()
for i in sa:
    v=v+i

print(v)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, l = map(int, input().split())
S = list()
result = ''
while l > 0:
    S.append(input())
    l -= 1

for i in sorted(S):
    result += i 

print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(''.join(B))

Submission status: Runtime Error

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

number, length = map(int, input())
lst = []
for n in range(number):
    input = input()
    lst.append(input)

lst.sort()
moji = ""
for n in lst:
    moji += n
print(moji)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,L=map(int,input().split())
S=[input() for _ in range(N)]
arr=[]
for i in range(N):
	for j in range(N):
		for k in range(N):
			if i!=j and j!=k and i!=k:
				arr.append(S[i]+S[j]+S[k])
print(sorted(arr)[0])

Submission status: Runtime Error

Solution code:
N,L=map(int,input().split())
S=[input() for _ in range(N)]
arr=[]
for i in range(N):
	for j in range(N):
		for k in range(N):
			if i!=j and j!=k:
				arr.append(S[i]+S[j]+S[k])
print(sorted(arr)[0])

Submission status: Runtime Error

Solution code:
n, l = (int(x) for x in input().split())
s_list = []
s = ''
for i in range(n):
  s_list.append(input())
for i in range(l):
  s += s_list.pop(s_list.index(min(x for x in s_list)))
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = []
Str = ''
for i in range(N):
    lst.append(input())
for k in range(N):
    for M in range(M-1):
        if lst[M] > lst[M+1]:
            lst[M],lst[M+1] = lst[M+1] , lst[M]
for j in range(N):
    Str += lst[j]
print(Str)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = []
Str = ''
for i in range(N):
    lst.append(input())
for k in range(N):
    for M in range(M-1):
        if lst[M] > lst[M+1]:
            lst[M],lst[M+1]  ==lst[M+1] , lst[M]
for j in range(N):
    Str += lst[j]
print(Str)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
Str = ''
for i in range(n):
    lst.append(input())
lst.sort()
for j in lst:
    Str += j
print(Str)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
Str = ''
for i in range(L):
    lst.append(input())
lst.sort()
for j in lst:
    Str += j
print(Str)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
Str = ''
for i in range(L):
    lst.append(input())
for k  in range(N):
    for j in range(N-1):
        if lst[j]+lst[j+1] >= lst[j+1]+lst[j]:
            lst[j],lst[j+1] = lst[j+1] ,lst[j]

for i in lst:
    Str += i
print(Str)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
Str = ''
for i in range(L):
    lst.append(input())
for k  in range(N):
    for j in range(N-1):
        if lst[j] >= lst[j+1]:
            lst[j],lst[j+1] = lst[j+1] ,lst[j]

for i in lst:
    Str += i
print(Str)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
Str = ''
for i in range(L):
    lst.append(input())
for k  in range(N):
    for j in range(N-1):
        if lst[j] >= lst[j+1]:
            lst[j],lst[j+1] = lst[j+1] ,lst[j]

for i in lst:
    Str += i
print(lst)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
lst2 = ''
for i in range(L):
    lst.append(input())
lst.sort()
#for k  in range(N):
#    for j in range(N-1):
#        if lst[j] > lst[j+1]:
#            lst[j],lst[j+1] = lst[j+1] ,lst[j]

for i in lst:
    lst2 += i
print(lst2)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
lst2 = ''
for i in range(L):
    lst.append(input())
lst.sort()
#for k  in range(N):
#    for j in range(N-1):
#        if lst[j] > lst[j+1]:
#            lst[j],lst[j+1] = lst[j+1] ,lst[j]

for i in range(L):
    lst2 += lst[i]
print(lst2)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
lst2 = ''
for i in range(L):
    lst.append(input())
for k  in range(N):
    for j in range(N-1):
        if lst[j] > lst[j+1]:
            lst[j],lst[j+1] = lst[j+1] ,lst[j]

for M in range(L):
    lst2 += lst[M]
print(lst2)

Submission status: Runtime Error

Solution code:
N , L= map(int,input().split())
lst = list()
lst2 = ''
for i in range(L):
    lst.append(input())
for k in range(N):
    for j in range(N-1):
        if lst[j] > lst[j+1]:
            lst[j],lst[j+1] = lst[j+1] ,lst[j]

for M in range(L):
    lst2 += lst[M]
print(lst2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

N, L = map(int, input().split())
arr = [input() for i in range(N)]
sort_arr = sorted(arr)
for i in range(L):
    print(sort_arr[i], end = "")

Submission status: Runtime Error

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

s1 = min(strs)
strs.remove(s1)
s2 = min(strs)
strs.remove(s2)
print(s1+s2+strs[0])

Submission status: Runtime Error

Solution code:
N   =   int(input())
L   =   int(input())

s_list = [input() for _ in range(N)]
s_list.sort()

for ele in s_list: 
    print(ele, end = '')

Submission status: Runtime Error

Solution code:
N   =   int(input())
L   =   int(input())

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

for ele in sorted(s_list): 
    print(ele, end = '')

Submission status: Runtime Error

Solution code:
N   =   int(input())
L   =   int(input())
a   =   []
for i in range(N):
    a.append(input())
for ele in sorted(a): 
    print(ele, end = '')

Submission status: Runtime Error

Solution code:
n,l=map(int,input().split())
words=[]
for i in range(n):
  words.append(input())
for i in range(n-1,-1,-1):
  words.sort(key=lambda x:ord(x[i]))
ans=""
for i in range(n):
  ans+=words[i]
print(ans)

Submission status: Runtime Error

Solution code:
n,l=map(int,input().split())
words=[]
for i in range(n):
  words.append(input())
for i in range(n-1,0,-1):
  words.sort(key=lambda x:ord(x[i]))
ans=""
for i in range(n):
  ans+=words[i]
print(ans)

Submission status: Runtime Error

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

for i in range(N):
    arr.append(S[i])

print(''.join(arr))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N , L = (int(i) for i in input().split())
t = [str(input()) for i in range(N)]
t.sort()
for x in range(0,L):
    print(t[x],end="")

Submission status: Runtime Error

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

a = input()
b = input()
c = input()
ar = [a,b,c]
ar.sort()
result = ''.join(ar)

print(result)

Submission status: Runtime Error

Solution code:
int main ():
  N = input('>>')
  L = input('>>')
  
  for i in range(N):
    dict = [input('>>')]
    
  dict.sort()
  
  for i in range(N):
    print(str(dict[i]))

  
if __name__  = '__main__':
  main()

Submission status: Runtime Error

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

k=[]

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

x=sort(k)
z="".join(x)

print(z)

Submission status: Runtime Error

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

string.sort()
result = ''.join(string)
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: UTF-8 -*-
L, N = map(int, input().split())
a = [input() for i in range(N)]
a.sort()
b = "".join(a)
print(b)

Submission status: Runtime Error

Solution code:
# -*- coding: UTF-8 -*-
L, N = map(int, input().split())
a = list(input() for i in range(N))
a.sort()
b = "".join(a)
print(b)

Submission status: Runtime Error

Solution code:
# -*- coding: UTF-8 -*-
L, N = map(int, input().split())
a = list(input() for i in range(N))
a.sort()
b = " ".join(a)
print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,L=map(int,input())
S=sorted(list(map(int,input())))
ans = ""
for x in S:
  ans += x
print(ans)

Submission status: Runtime Error

Solution code:
#include <stdio.h>
#include <string.h>
int main(void){
    // Your code here!
    char s[110][110],tmp[110];
    int l,n,i,j;
    scanf("%d%d",&n,&l);
    for(i=0;i<n;i++){
        scanf("%s",s[i]);
    }
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(strcmp(s[i],s[j])>=1){
                strcpy(tmp,s[i]);
                strcpy(s[i],s[j]);
                strcpy(s[j],tmp);
            }
        }
    }
    for(i=0;i<n;i++){
        printf("%s",s[i]);
    }
    printf("\n");
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
lists = []
for a in range(a):
  s = input()
  lists.append(s)

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

Submission status: Runtime Error

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

alphabet = []
for i in range (L):
    word = input()
    alphabet.append(word)
    
alphabet.sort()
print(''.join(alphabet))

Submission status: Runtime Error

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

alphabet = []
for i in range (L):
    word = input()
    alphabet.append(word)
    
alphabet.sort()
print(''.join(alphabet))

Submission status: Runtime Error

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

mojil=[]

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

mojil.sort()

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

Submission status: Runtime Error

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

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

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

print(ans)

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 i in range(n)]
s = sorted(s)
print(*s, sep="")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,M = map(int, input().split())
words = [input() for i in range(N)]
words=words.sort()
for word in words:
  print(word,"")

Submission status: Runtime Error

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

s.sort()
for i in range(l):
  print(s[i],end="")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

print(answer)

Submission status: Runtime Error

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:
  answer+=i
print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

int main(){
	int N,L;
	cin>>N>>L;
	string S[N];
	string ans;
	for(int i=0;i<N;++i){
		cin>>S[i];
	}
	sort(S,S+N);
	for(int i=0;i<N;++i){
		ans+=S[i];
	}
	cout<<ans<<endl;
}

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def dic(a,b):
    for i in range(l):
        if ord(a[i])<ord(b[i]):
            c =0
            break
        if ord(b[i])<ord(a[i]):
            c =1
            break
    return c

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

ans =""
for x in s:
    ans +=x

print(ans)

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
A=[]
B=list(map(int,input().split()))
for t in range(10):
     if t not in B:
         A.append(t)
A=set(list(map(str,A)))
for s in range(n,10001):
    if set(list(str(s)))<=A:
        print(s)
        exit()

Submission status: Runtime Error

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

for x in s:
    mojiretu += x
print(mojiretu)

Submission status: Runtime Error

Solution code:
N,L=map(input().split())
list=[]
i=0
while i<N:
    S=input()
    list.append(S)
    i+=1
list.sort()
print(''.join(list))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input().split()[0])
l=[]
for i in range(n):
  l.append(input)
l.sort()
r=""
for i in l:
  r+=i
print(r)

Submission status: Runtime Error

Solution code:
#最初に入力される情報を整理する
str_input_list = input().rstrip().split(' ')

int_input_list = []
for a in str_input_list:
    int_input_list.append(int(a))

length = int_input_list[0]
amount = int_input_list[1]

#文字列を受け取りリストに格納
mojiretu_list = []
for a in range(amount):
    mojiretu_list.append(input())


#文字列を小さい順に並べ、結合
sorted_list = sorted(mojiretu_list)
min_mojiretu = ''
for a in range(amount):
    min_mojiretu += sorted_list[a]

#出力
print(min_mojiretu)

Submission status: Runtime Error

Solution code:
#最初に入力される情報を整理する
str_input_list = input().rstrip().split(' ')

int_input_list = []
for a in str_input_list:
    int_input_list.append(int(a))

length = int_input_list[0]
amount = int_input_list[1]

#文字列を受け取りリストに格納
mojiretu_list = []
for a in range(amount):
    mojiretu_list.append(input())

#文字列を小さい順に並べ、結合
sorted_list = sorted(mojiretu_list)
min_mojiretu = ''
for a in range(amount):
    min_mojiretu += sorted_list[a]

#出力
print(min_mojiretu)

Submission status: Runtime Error

Solution code:
N, L = [int(i) for i in input().split()]
s_list = []
result = ""
for _ in range(N):
    s = input()
    for l in range(L):   
        s_list.append(ord(s[l]))
s_head = s[::l]
#print(s_list)

for _ in range(N):
    if s_head.count(min(s_head)) > 1:
        continue
    elif s_head.count(min(s_head)) == 1:
        pop_index = s_list.index(min(s_list))
        for l in range(L):
            tmp = s_list.pop(pop_index)
            result += chr(tmp)
print(result)

Submission status: Runtime Error

Solution code:
N, L = [int(i) for i in input().split()]
s_list = []
result = ""
for _ in range(N):
    s = input()
    for l in range(L):   
        s_list.append(ord(s[l]))
s_head = s[::l]
print(s_list)

for _ in range(N):
    if s_head.count(min(s_head)) > 1:
        continue
    elif s_head.count(min(s_head)) == 1:
        pop_index = s_list.index(min(s_list))
        for l in range(L):
            tmp = s_list.pop(pop_index)
            result += chr(tmp)
print(result)

Submission status: Runtime Error

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

sn = []

for _ in range(n):
  sn.append(input())
  
sn = sorted(sn)

sn = join(sn)

print(sn)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, L = map(int, input().split())
 
#標準入力からリストの作成
list = []
for _ in range(N):
 i = input()
list.append(i)

#リストのソート
list_a = list.sorted()
 
#リストの結合
mojiretu = ''.join(list_a)
 
print(mojiretu)

Submission status: Runtime Error

Solution code:
N, L = map(int, input().split())
 
#標準入力からリストの作成
list = []
for _ in (1,N):
 i = input()
 list.append(i)
 
#リストの結合
mojiretu = ''.join(list)
 
print(mojiretu

Submission status: Runtime Error

Solution code:
N, L = map(int, input().split())
 
#標準入力からリストの作成
list = []
for _ in range(1,N):
 i = input()
 list.append(i)
 
#リストの結合
mojiretu = ''.join(list)
 
print(mojiretu

Submission status: Runtime Error

Solution code:
N, L = map(int, input().split())
 
#標準入力からリストの作成
a = map(str, input().split())
a = a.sort()
 
#リストの結合
mojiretu = ''.join(a)
 
print(mojiretu)

Submission status: Runtime Error

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

#標準入力からリストの作成
a = map(str, input().split())
a = a.sort()

#リストの結合
mojiretu = ''join(a)

print(mojiretu)

Submission status: Runtime Error

Solution code:
#include<iostream>
using namespace std;
int main() {
    int n, l;
    cin >> n >> l;
    string str[100];
    for (int i = 0; i < n; ++i) {
        string s;
        cin >> s;
        str[i] = s;
    }
    sort(str, str + n);
    for (int i = 0; i < n; ++i) {
        cout << str[i];
    }
    cout << endl;
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=[input() for i in n]
print(s.sort())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
d = input().rstrip()
d_list = d.split(" ")
t_list = []
for i in range(int(d_list[1])):
    t_list.append(str(input().rstrip()))


def solution(t_list):
    t_list.sort()
    ans_str = ""
    for i in t_list:
        ans_str += i
    return ans_str
    
def main():
    print(solution(t_list))
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
d = input().rstrip()
d_list = d.split(" ")
t_list = []
for i in range(int(d_list[1])):
    t_list.append(input().rstrip())


def solution(t_list):
    t_list.sort()
    ans_str = ""
    for i in t_list:
        ans_str += i
    return ans_str
    
def main():
    print(solution(t_list))
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

ans = ''

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

print(ans)

Submission status: Runtime Error

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

result = ""
s.sort()
for i in range(l):
    result += s[i]

print(result)

Submission status: Runtime Error

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

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

a.sort()

b=str(a)
b=b.replace(",","")
b=b.replace("[","")
b=b.replace("]","")
b=b.replace("'","")
b=b.replace(" ","")


print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
data = list(map(lambda x: int(x), input().split()))
strings = [input() for _ in range(data[1])]
strings.sort()
s = ''
for x in strings:
    s += x
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = [
    inputs[0] + inputs[1] + inputs[2],
    inputs[0] + inputs[2] + inputs[1],
    inputs[1] + inputs[0] + inputs[2],
    inputs[1] + inputs[2] + inputs[0],
    inputs[2] + inputs[0] + inputs[1],
    inputs[2] + inputs[1] + inputs[0],
]

print(min(ans))

Submission status: Runtime Error

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

ans = []

for i in range(L):
    for j in range(L):
        for k in range(L):
            if i != j and j != k:
                ans.append(inputs[i] + inputs[j] + inputs[k])

print(min(ans))

Submission status: Runtime Error

Solution code:
n = int(raw_input())
s = ''
for i in range(n):
    s += raw_input()
s = sorted(s)
ans = ''
for i in s:
    ans += i
print ans

Submission status: Runtime Error

Solution code:
lengh,num = map(int,input().split())
lis = [input() for i in range(num)]
print("".join(sorted(lis)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, L = map(int, input().split())
S = [input() for i in range(N)]
print("{0}{1}{2}".format(sorted(S)[0],sorted(S)[1],sorted(S)[2]))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

str_list.sort()

ans = ""
for i in range(L):
    ans += str_list[i]

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

res = ""
for i in array:
    res += i

print(res)

Submission status: Runtime Error

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

# AtCoder Beginner Contest
# Problem B

if __name__ == '__main__':
    n, length = list(map(int, input().split()))
    s = sorted([input() for _ in range(length)])

    print(''.join(s))

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;
int main()
{
    int N, L;
    cin >> N >> L;
    vector<string> v;
    string ret;

    string s;
    for(int i=0; i<N; i++){
        cin >> s;
        v.push_back(s);
    }

    sort(v.begin(), v.end(), less<string>() );
    for(vector<string>::iterator it = v.begin(); it != v.end(); it++){
        ret += *it;
    }
    cout << ret << endl;                                                                

    return 0;
}

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
N,L = map(int,input().split())
ANS=[]
ans=""
for hoge in range(L):
    S=input()
    ANS.append(S)
ANS=sorted(ANS)
for fuga in ANS:
    ans=ans+fuga
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

str_list.sort()

print("".join(str_list))

Submission status: Runtime Error

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

str_list.sort()

print("".join(str_list))

Submission status: Runtime Error

Solution code:
n,l = input().split()
n = int(n)
s = []
for i in range(n):
    s.append(input())
s.sort()
print(s[0]+s[1]+s[2])