





def    __UpperCAmelCase(      lowercase_      ):
       stooge(lowercase_ ,    0 ,    len(lowercase_      ) - 1      )
       return arr




def    __UpperCAmelCase(      lowercase_ ,    lowercase_ ,    lowercase_      ):
       if i >= h:
              return

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

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

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

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

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


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








import unittest

from knapsack import knapsack as k







class 			__A       (      unittest.TestCase  ):




      """simple docstring"""







      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     Dict	=		0
             _lowerCamelCase							:     int	=		[0]
             _lowerCamelCase							:     Optional[int]	=		[0]
             _lowerCamelCase							:     Dict	=		len(a__)
             self.assertEqual(k.knapsack(a__      ,							a__      ,							a__      ,							a__)      ,							0)

             _lowerCamelCase							:     str	=		[60]
             _lowerCamelCase							:     List[str]	=		[10]
             _lowerCamelCase							:     List[Any]	=		len(a__)
             self.assertEqual(k.knapsack(a__      ,							a__      ,							a__      ,							a__)      ,							0)


      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     Union[str, Any]	=		3
             _lowerCamelCase							:     List[Any]	=		[1, 2, 3]
             _lowerCamelCase							:     Dict	=		[3, 2, 1]
             _lowerCamelCase							:     Any	=		len(a__)
             self.assertEqual(k.knapsack(a__      ,							a__      ,							a__      ,							a__)      ,							5)



      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     Optional[Any]	=		50
             _lowerCamelCase							:     Dict	=		[60, 100, 120]
             _lowerCamelCase							:     Dict	=		[10, 20, 30]
             _lowerCamelCase							:     Union[str, Any]	=		len(a__)
             self.assertEqual(k.knapsack(a__      ,							a__      ,							a__      ,							a__)      ,							220)


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

