


"""simple docstring"""






def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:list		,			_SCREAMING_SNAKE_CASE	:int		,			_SCREAMING_SNAKE_CASE	:int  )				-> None:
						if right <= left:
												return
						a_							:			int     		=					left
						a_							:			Optional[int]     		=					right
						a_							:			Any     		=					sorting[left]
						while i <= b:
												if sorting[i] < pivot:
																		a_							:			str     		=					sorting[i], sorting[a]
																		a += 1
																		i += 1
												elif sorting[i] > pivot:
																		a_							:			int     		=					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  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:list		,			_SCREAMING_SNAKE_CASE	:int		,			_SCREAMING_SNAKE_CASE	:int  )				-> None:
						if left < right:
												a_							:			List[str]     		=					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  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:list		,			_SCREAMING_SNAKE_CASE	:int		,			_SCREAMING_SNAKE_CASE	:int  )				-> int:
						a_							:			int     		=					sorting[right]
						a_							:			List[Any]     		=					left
						for i in range(_SCREAMING_SNAKE_CASE		,			_SCREAMING_SNAKE_CASE  ):
												if sorting[i] < pivot:
																		a_							:			List[str]     		=					sorting[i], sorting[store_index]
																		store_index += 1
						a_							:			Tuple     		=					sorting[store_index], sorting[right]
						return store_index

def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:list  )				-> list:
						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)

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





"""simple docstring"""






def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:int  )				-> Optional[int]:
						a_							:			List[Any]     		=					len(_SCREAMING_SNAKE_CASE  )
						for _ in range(
						    0		,			int(((no_of_elements - 1) / 2) + 1  )  ):  # we don't need to traverse to end of list as
												for j in range(0		,			no_of_elements - 1  ):
																		if (
																		    lst[j + 1] < lst[j]
																		):  # applying bubble sort algorithm from left to right (or forwards)
																								a_							:			List[str]     		=					lst[j + 1]
																								a_							:			Optional[Any]     		=					lst[j]
																								a_							:			Optional[Any]     		=					temp
																		if (
																		    lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
																		):  # applying bubble sort algorithm from right to left (or backwards)
																								a_							:			Dict     		=					lst[no_of_elements - 1 - j]
																								a_							:			Dict     		=					lst[no_of_elements - 2 - j]
																								a_							:			Any     		=					temp
						return lst


if __name__ == "__main__":
				print('enter the list to be sorted')
				UpperCamelCase     					=     [int(x) for x in input().split()]  # inputing elements of the list in one line
				UpperCamelCase     					=     double_sort(lst)
				print('the sorted list is')
				print(sorted_lst)




