






'''simple docstring'''







def 			__UpperCamelCase				(			lowercase_					:     list      ,					lowercase_					:     int      ,					lowercase_					:     int      ):
       """simple docstring"""




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


def 			__UpperCamelCase				(			lowercase_					:     list      ,					lowercase_					:     int      ,					lowercase_					:     int      ):
       """simple docstring"""




       if left < right:
              a_	    = lomuto_partition(lowercase_      ,					lowercase_      ,					lowercase_      )
              quick_sort_lomuto_partition(lowercase_      ,					lowercase_      ,					pivot_index - 1      )
              quick_sort_lomuto_partition(lowercase_      ,					pivot_index + 1      ,					lowercase_      )


def 			__UpperCamelCase				(			lowercase_					:     list      ,					lowercase_					:     int      ,					lowercase_					:     int      ):
       """simple docstring"""




       a_	    = sorting[right]
       a_	    = left
       for i in range(lowercase_      ,					lowercase_      ):
              if sorting[i] < pivot:
                     a_    ,  a_	    = sorting[i], sorting[store_index]
                     store_index += 1
       a_    ,  a_	    = sorting[store_index], sorting[right]
       return store_index


def 			__UpperCamelCase				(			lowercase_					:     list      ):
       """simple docstring"""




       if len(lowercase_      ) <= 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)












'''simple docstring'''







import re


def 			__UpperCamelCase				(			lowercase_					:     int      ):
       """simple docstring"""




       def docstring_decorator(lowercase_					:     int      ):
              a_	    = fn.__doc__
              a_	    = func_doc.split('\n'      )
              a_	    = 0
              while i < len(lowercase_      ) and re.search(R'^\s*Examples?:\s*$'      ,					lines[i]      ) is None:
                     i += 1
              if i < len(lowercase_      ):
                     a_	    = example_docstring
                     a_	    = '\n'.join(lowercase_      )
              else:
                     raise ValueError(
                         F'The function {fn} should have an empty \'Examples:\' in its docstring as placeholder, '
                         F'current docstring is:\n{func_doc}'      )
              a_	    = func_doc
              return fn

       return docstring_decorator




