def quick(nums):
if len(nums) <= 1:
return nums
pivot = nums[len(nums) // 2]
left = [x for x in nums if x < pivot]
mid = [x for x in nums if x == pivot]
right = [x for x in nums if x > pivot]
return quick(left) + mid + quick(right)
if __name__ == "__main__":
n = int(input())
nums = list(map(int, input().split()))
nums = quick(nums)
print(" ".join(list(map(str, nums))))