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 = [int(i) for i in input().split()]
a = [input() for j in range(n)]
a.sort()
print(''.join(a))

Submission status: Accepted

Solution code:
def main():

    N, L = map(int, input().split())
    w = []
    for _ in range(N):
        w.append(input())
    w.sort()
    return "".join(w)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S_list.sort()
mojiretu = ""

for X in S_list:
    mojiretu += X

print(mojiretu)

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,input().split())
s = [input() for _ in range(n)]
print(''.join(sorted(s)))

Submission status: Accepted

Solution code:
n, l = map(int, input().split())
s = sorted(str(input()) for k in range(n))
p = ""
for i in s:
    p+=i
print(p)

Submission status: Accepted

Solution code:
n, l = map(int, input().split())
s = sorted(str(input()) for k in range(n))
end = "".join(s)
print(end)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(''.join(s))

Submission status: Accepted

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

Submission status: Accepted

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

a = [input() for x in range(N)]

a.sort()

print(''.join(a))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N,L = inputMap()
    S = []
    for _ in range(N):
        tmp = input()
        S.append(tmp)
        
    S.sort()
    ans = ""
    for vol in S:
        ans += vol
        
    print(ans)
    
if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

ss = [input() for i in range(NL[0])]

ss.sort()

print(''.join(ss))

Submission status: Accepted

Solution code:
num,long = map(int,input().split())
lines = [input() for i in range(num)]
lines.sort()
answer = ""
for line in lines:
    answer += line
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

l_str=[]
for _ in range(n):
  a=input()
  l_str.append(a)
  
l_str.sort()
ans=''.join(l_str)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

strings.sort()
print("".join(strings))

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    n, l = map(int, input().split())

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

    print("".join(sorted(sl)))

Submission status: Accepted

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

Submission status: Accepted

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

print("".join(s))

Submission status: Accepted

Solution code:
n,l=map(int,input().split())
s=[str(input()) for _ in range(n)]
sort_s=sorted(s)
#'間に挿入する文字列'.join([連結したい文字列のリスト])
print(''.join(sort_s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

  
array.sort()

print("".join(array))

Submission status: Accepted

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

Submission status: Accepted

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

list = [str(input()) for i in range(a)]

print(''.join(map(str, sorted(list))))

Submission status: Accepted

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

Submission status: Accepted

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

print(sum)

Submission status: Accepted

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

print("".join(sorted(S)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
list=[]
num=s.split(' ')[0]
for i in range(int(num)):
    list.append(input())
new_list=sorted(list)
print(''.join(new_list))

Submission status: Accepted

Solution code:
N, L = [int(y) for y in input().split(' ')]
arr = sorted([input() for x in range(N)], reverse=False)

print(''.join(arr))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nl = input().split()
n = int(nl[0])
l = int(nl[1])
s = []

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

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



print(s)

Submission status: Accepted

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

result.sort()
print(*result,sep="")

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("".join(sorted(open(0).read().split()[2:])))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition)
n, l = map(int, input().split())
slist = [input() for i in range(n)]

slist = sorted(slist)
ans = ''.join(slist)

print(ans)

Submission status: Accepted

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

print(''.join(lt))

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 -*-
n, l = map(int, input().split())
a = []
b = ''

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

for i in range(len(a)):
  b += a[i]
print(b)

Submission status: Accepted

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

# 入力されるデータをすべて格納
for i in range(N):
  str.append(input())

str.sort()

str_sort = str[0]

for s in str[1:]:
  str_sort = str_sort + s
  
print(str_sort)

Submission status: Accepted

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

for _ in range(N):
    S.append(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

data=[]
for n in range(int(N)):
    data.append(input())
  
iroha=""
A=sorted(data)
for i in A:
    iroha+=i
    
print(iroha)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc042/tasks/abc042_b

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

Submission status: Accepted

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

data.sort()
for n in range(N):
  print(data[n],end='')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = sorted([ input() for i in range(n) ])
print(''.join(x))

Submission status: Accepted

Solution code:
inputted = input().split(" ")
N=int(inputted[0])
L=int(inputted[1])
s = [input() for i in range(N)]
s.sort()
print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_first = input().split()
N = int(input_first[0])
L = int(input_first[1])
list_input = []

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

sorted_list_input = sorted(list_input)
#print(list_input)
#print(sorted(list_input))
for j in range(N):
    print(sorted_list_input[j], end="")
print("")

Submission status: Accepted

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

Submission status: Accepted

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

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

sorted_S = sorted(S)

print("".join(sorted_S))

Submission status: Accepted

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

Submission status: Accepted

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

X.sort()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

# print(S)

S.sort()

# print(S)

ans = "".join(S)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(''.join(sorted(a)))

Submission status: Accepted

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

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

str_array.sort()

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

print(result)

Submission status: Accepted

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

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

print(*words,sep ="")

Submission status: Accepted

Solution code:
import sys
from fractions import gcd
import bisect
 
stdin = sys.stdin
 
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n, l = na()
st = []
for i in range(n):
        st.append(ns())
st.sort()
print(*st, sep='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,l=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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

w_list = []
for _ in range(S):
  w_list.append(input())
w_list.sort()
w = "".join(w_list)
print(w)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def B_IrohaLovesStrings():
    N, L = map(int, input().split())
    S = [input() for x in range(N)]
    S.sort()
    print(*S, sep="")
    
if __name__ == "__main__":
    B_IrohaLovesStrings()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
inp = input().split(" ")
N = int(inp[0])
L = int(inp[1])
s = []
for i in range(N):
  	s.append(input())
s.sort()
res = ""
for i in range(N):
	res += s[i]
print(res)

Submission status: Accepted

Solution code:
n, l = map(int, input().split())
s = []
for i in range(n):
  s.append(str(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())

print(''.join(sorted(s)))

Submission status: Accepted

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

S.sort()
print(*S, sep = '')

Submission status: Accepted

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

Submission status: Accepted

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

print(*s,sep = "")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s_list = sorted(s_list)

print(*s_list, sep='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

word_list.sort()
ans = 0

for word in range(n):
    for letter in range(l):
        if ans == 0:
            ans = word_list[word][letter]
        else:
            ans = "{0}{1}".format(ans, word_list[word][letter])

print(ans)

Submission status: Accepted

Solution code:
# 文字列の結合は+,+=か、a.join(b)を使う
# 文字列のリストのソート。数字のリストのソートと変わらない。list.sort()でOK
n,l = map(int,input().split())
s = [ input() for _ in range(n)]
s.sort()
ans = "" #empty string
for i in range(n):
  ans += s[i]
print(ans)

Submission status: Accepted

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

str_lists.sort()

result_str = ''
for j in str_lists:
    result_str += j

print(result_str)

Submission status: Accepted

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

print(''.join(sorted(S)))
# Either is ok

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import heapq

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

a=[]

for i in range(n):
  #print(i)
  
  a.append(str(input()))

a.sort()

result=""
for item in a:
  result=result+item
print(result)

Submission status: Accepted

Solution code:
N, L = map(int, input().rstrip().split())
li = [input() for x in range(N)]

print("".join(sorted(li)))

Submission status: Accepted

Solution code:
#! /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
N, L = map(int, input().split())
S = []
for i in range(N):
    S.append(input())
print(('').join(sorted(S)))

Submission status: Accepted

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

print( "".join(sorted(S)) )

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num=input()
N,L=[int(s) for s in num.split(" ")]

list=[]
for i in range(1,N+1,1):
    list.append(input())
    list.sort()
mozi="".join(list)

print(mozi)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
  s.append(input())
  
s.sort()
print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for s in range(len(S)):
    ans += S[s]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

sList.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list01 = str(input()).split()

N = int(list01[0])
L = int(list01[1])

chara = list()

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

chara.sort()

new_str = ''.join(chara)

print(new_str)

Submission status: Accepted

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

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, input().rstrip("\n").split())
strings = sorted([input().rstrip() for _ in range(n)])

print("".join(strings))

Submission status: Accepted

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

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

ans = ''.join(text_list)
print(ans)