N,L = input().split()

txt = []

for i in range(int(N)):

    s = eval(input())

    txt.append(s)

txt_sort = sorted(txt)

ts = ""

for i in range(int(N)):

    ts += txt_sort[i]

print(ts)

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

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

print(*s,sep="")

N, L = input().split()
txt = []
for i in range(int(N)):
    s = eval(input())
    txt.append(s)
txt_sort = sorted(txt)
ts = ""
for i in range(int(N)):
    ts += txt_sort[i]
print(ts)

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

-N, L = input().split() -txt = [] -for i in range(int(N)): -    s = eval(input()) -    txt.append(s) -txt_sort = sorted(txt) -ts = "" -for i in range(int(N)): -    ts += txt_sort[i] -print(ts) +n, l = map(int, input().split()) +s = sorted([input() for i in range(n)]) +print(*s, sep="")