

def   __SCREAMING_SNAKE_CASE (SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__	):
						if right <= left:
												return
						snake_case_       =     left
						snake_case_       =     right
						snake_case_       =     sorting[left]
						while i <= b:
												if sorting[i] < pivot:
																		snake_case_       =     sorting[i], sorting[a]
																		a += 1
																		i += 1
												elif sorting[i] > pivot:
																		snake_case_       =     sorting[i], sorting[b]
																		b -= 1
												else:
																		i += 1
						quick_sort_apartition(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__  ,		a - 1	)
						quick_sort_apartition(SCREAMING_SNAKE_CASE__  ,		b + 1  ,		SCREAMING_SNAKE_CASE__	)





def   __SCREAMING_SNAKE_CASE (SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__	):
						if left < right:
												snake_case_       =     lomuto_partition(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__	)
												quick_sort_lomuto_partition(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__  ,		pivot_index - 1	)
												quick_sort_lomuto_partition(SCREAMING_SNAKE_CASE__  ,		pivot_index + 1  ,		SCREAMING_SNAKE_CASE__	)





def   __SCREAMING_SNAKE_CASE (SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__	):
						snake_case_       =     sorting[right]
						snake_case_       =     left
						for i in range(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__	):
												if sorting[i] < pivot:
																		snake_case_       =     sorting[i], sorting[store_index]
																		store_index += 1
						snake_case_       =     sorting[store_index], sorting[right]
						return store_index





def   __SCREAMING_SNAKE_CASE (SCREAMING_SNAKE_CASE__	):
						if len(SCREAMING_SNAKE_CASE__	) <= 1:
												return sorting
						return (
						    three_way_radix_quicksort([i for i in sorting if i < sorting[0]]	)
						    + [i for i in sorting if i == sorting[0]]
						    + three_way_radix_quicksort([i for i in sorting if i > sorting[0]]	)
						)


if __name__ == "__main__":
					import doctest

					doctest.testmod(verbose=True)

					lowerCAmelCase_	     =     input('''Enter numbers separated by a comma:\n''').strip()
					lowerCAmelCase_	     =     [int(item) for item in user_input.split(''',''')]
					quick_sort_apartition(unsorted, 0, len(unsorted) - 1)
					print(unsorted)


from __future__ import annotations

from random import randrange


def   __SCREAMING_SNAKE_CASE (SCREAMING_SNAKE_CASE__	):
						if len(SCREAMING_SNAKE_CASE__	) < 2:
												return collection
						snake_case_       =     randrange(len(SCREAMING_SNAKE_CASE__	)	)  # Use random element as pivot
						snake_case_       =     collection[pivot_index]
						snake_case_       =     []  # All elements greater than pivot
						snake_case_       =     []  # All elements less than or equal to pivot

						for element in collection[:pivot_index]:
												(greater if element > pivot else lesser).append(SCREAMING_SNAKE_CASE__	)

						for element in collection[pivot_index + 1 :]:
												(greater if element > pivot else lesser).append(SCREAMING_SNAKE_CASE__	)

						return [*quick_sort(SCREAMING_SNAKE_CASE__	), pivot, *quick_sort(SCREAMING_SNAKE_CASE__	)]


if __name__ == "__main__":
					lowerCAmelCase_	     =     input('''Enter numbers separated by a comma:\n''').strip()
					lowerCAmelCase_	     =     [int(item) for item in user_input.split(''',''')]
					print(quick_sort(unsorted))