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

b = [eval(input()) for i in range(a[0])]

c = sorted(b)

print(("".join(c)))
N , L= list(map(int,input().split()))

lst = []

for i in range(N):

    lst.append(eval(input()))

lst.sort()

Str = ''

for j in range(N):

    Str += lst[j]

print(Str)
a = list(map(int, input().split()))
b = [eval(input()) for i in range(a[0])]
c = sorted(b)
print(("".join(c)))

N, L = list(map(int, input().split()))
lst = []
for i in range(N):
    lst.append(eval(input()))
lst.sort()
Str = ""
for j in range(N):
    Str += lst[j]
print(Str)

-a = list(map(int, input().split())) -b = [eval(input()) for i in range(a[0])] -c = sorted(b) -print(("".join(c))) +N, L = list(map(int, input().split())) +lst = [] +for i in range(N): +    lst.append(eval(input())) +lst.sort() +Str = "" +for j in range(N): +    Str += lst[j] +print(Str)