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

S = [eval(input()) for _ in range(N)]



S.sort()

ans = ''



for i in S:

    ans += i

print(ans)

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

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



S.sort()

[print(i,end='') for i in S]

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

N, L = [int(i) for i in input().split()]
S = [input() for _ in range(N)]
S.sort()
[print(i, end="") for i in S]

-S = [eval(input()) for _ in range(N)] +S = [input() for _ in range(N)] -ans = "" -for i in S: -    ans += i -print(ans) +[print(i, end="") for i in S]