# 选择排序
arraystr = input().split(',')
array = [int(i) for i in arraystr]
def selectsort(array):
# ********* Begin *********
for i in range(len(array)):
min=999999
flag=0
for j in range(i,len(array)):
if min==array[j]:
break
if min>=array[j]:
min=array[j]
flag=j
temp=array[i]
array[i]=min
array[flag]=temp
if i!=len(array)-1:
print(array)
# ********* End *********
return array
print("排序之后的结果为:{}".format(selectsort(array)))