n = input().split()
m = []
p = []
for j in n:
    j = list(j)
    j.insert(0, j[1])
    m.append(j)
m = sorted(m)
for i in m:
    i.pop(0)
    p = ''.join(i)
    print(p, end=' ')