lst = list(map(int, input().split()))
lst.sort()
print(*lst)
def mySort(lst):
cnt = len(lst)
for j in range(cnt-1):
for i in range(cnt-1):
if lst[i] > lst[i+1]:
lst[i], lst[i+1] = lst[i+1], lst[i]
return lst
lst = list(map(int, input().split()))
res = mySort(lst)
print(*res)