import sys



data = sys.stdin.readline().strip().split(' ')

nums = [int(i) for i in data]

nums.sort()

print((' '.join([str(i) for i in nums])))
data = eval(input())

nums = [int(i) for i in data.split()]



max_idx = len(nums)

for i in range(1, max_idx):

    for j in range(max_idx-i):

        if nums[j] > nums[j+1]:

            nums[j], nums[j+1] = nums[j+1], nums[j]



print((' '.join([str(i) for i in nums])))
import sys

data = sys.stdin.readline().strip().split(" ")
nums = [int(i) for i in data]
nums.sort()
print((" ".join([str(i) for i in nums])))

data = eval(input())
nums = [int(i) for i in data.split()]
max_idx = len(nums)
for i in range(1, max_idx):
    for j in range(max_idx - i):
        if nums[j] > nums[j + 1]:
            nums[j], nums[j + 1] = nums[j + 1], nums[j]
print((" ".join([str(i) for i in nums])))

-import sys - -data = sys.stdin.readline().strip().split(" ") -nums = [int(i) for i in data] -nums.sort() +data = eval(input()) +nums = [int(i) for i in data.split()] +max_idx = len(nums) +for i in range(1, max_idx): +    for j in range(max_idx - i): +        if nums[j] > nums[j + 1]: +            nums[j], nums[j + 1] = nums[j + 1], nums[j]