

n_and_l = eval(input())



n, l = list(map(int, n_and_l.split()))





text = []



for num in range(0, n):

    text.append(eval(input()))





for object in range(1, n):

    for compare in range(0, object):

        if text[object] < text[compare]:

            tmp = text[object]

            text[object] = text[compare]

            text[compare] = tmp



answer = ""



for num in range(0, n):

    answer = answer + text[num]



print(answer)
num, len = list(map(int, input().split()))



strings = []

for n in range(num):

    strings.append(eval(input()))



strings.sort()



print((''.join(strings)))
n_and_l = eval(input())
n, l = list(map(int, n_and_l.split()))
text = []
for num in range(0, n):
    text.append(eval(input()))
for object in range(1, n):
    for compare in range(0, object):
        if text[object] < text[compare]:
            tmp = text[object]
            text[object] = text[compare]
            text[compare] = tmp
answer = ""
for num in range(0, n):
    answer = answer + text[num]
print(answer)

num, len = list(map(int, input().split()))
strings = []
for n in range(num):
    strings.append(eval(input()))
strings.sort()
print(("".join(strings)))

-n_and_l = eval(input()) -n, l = list(map(int, n_and_l.split())) -text = [] -for num in range(0, n): -    text.append(eval(input())) -for object in range(1, n): -    for compare in range(0, object): -        if text[object] < text[compare]: -            tmp = text[object] -            text[object] = text[compare] -            text[compare] = tmp -answer = "" -for num in range(0, n): -    answer = answer + text[num] -print(answer) +num, len = list(map(int, input().split())) +strings = [] +for n in range(num): +    strings.append(eval(input())) +strings.sort() +print(("".join(strings)))