
def a__    (       A_					):






  '''simple docstring'''





  stooge(A_,     0,     len(A_					) - 1					)
  return arr

def a__    (       A_,     A_,     A_					):






  '''simple docstring'''





  if i >= h:
    return

  # If first element is smaller than the last then swap them
  if arr[i] > arr[h]:
    __magic_name__     ,    __magic_name__				     =       arr[h], arr[i]

  # If there are more than 2 elements in the array
  if h - i + 1 > 2:
    __magic_name__				     =       (int)((h - i + 1) / 3					)

    # Recursively sort first 2/3 elements
    stooge(A_,     A_,     (h - t)					)

    # Recursively sort last 2/3 elements
    stooge(A_,     i + t,     (A_)					)

    # Recursively sort first 2/3 elements
    stooge(A_,     A_,     (h - t)					)


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





import unittest

from knapsack import knapsack as k





class   __a			(    unittest.TestCase      ):
 def 		SCREAMING_SNAKE_CASE__   (   self )					->				Tuple:




        '''simple docstring'''
        lowercase__:   List[Any]  			=   0
        lowercase__:   List[Any]  			=   [0]
        lowercase__:   str  			=   [0]
        lowercase__:   Tuple  			=   len(lowerCAmelCase__ )
        self.assertEqual(k.knapsack(lowerCAmelCase__				, lowerCAmelCase__				, lowerCAmelCase__				, lowerCAmelCase__ )				, 0 )

        lowercase__:   Optional[Any]  			=   [60]
        lowercase__:   Dict  			=   [10]
        lowercase__:   str  			=   len(lowerCAmelCase__ )
        self.assertEqual(k.knapsack(lowerCAmelCase__				, lowerCAmelCase__				, lowerCAmelCase__				, lowerCAmelCase__ )				, 0 )
 def 		SCREAMING_SNAKE_CASE__   (   self )					->				Union[str, Any]:




        '''simple docstring'''
        lowercase__:   Union[str, Any]  			=   3
        lowercase__:   List[str]  			=   [1, 2, 3]
        lowercase__:   Union[str, Any]  			=   [3, 2, 1]
        lowercase__:   Union[str, Any]  			=   len(lowerCAmelCase__ )
        self.assertEqual(k.knapsack(lowerCAmelCase__				, lowerCAmelCase__				, lowerCAmelCase__				, lowerCAmelCase__ )				, 5 )
 def 		SCREAMING_SNAKE_CASE__   (   self )					->				List[Any]:




        '''simple docstring'''
        lowercase__:   Optional[Any]  			=   50
        lowercase__:   str  			=   [60, 100, 120]
        lowercase__:   Any  			=   [10, 20, 30]
        lowercase__:   List[Any]  			=   len(lowerCAmelCase__ )
        self.assertEqual(k.knapsack(lowerCAmelCase__				, lowerCAmelCase__				, lowerCAmelCase__				, lowerCAmelCase__ )				, 220 )


if __name__ == "__main__":
 unittest.main()


