array = input().split()
new_array = sorted(array , key = lambda position: position[2])
print(" ".join(new_array))