






def 				lowerCamelCase__      (    __lowerCamelCase			:     Dict		):
  stooge(__lowerCamelCase  ,		0  ,		len(__lowerCamelCase		) - 1		)
  return arr






def 				lowerCamelCase__      (    __lowerCamelCase			:     Dict  ,		__lowerCamelCase			:     Optional[Any]  ,		__lowerCamelCase			:     str		):
  if i >= h:
    return

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

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

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

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

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


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










from functools import lru_cache






@lru_cache
def 				lowerCamelCase__      (    __lowerCamelCase			:     int		):
  if num < 0:
    raise ValueError("""Number should not be negative."""		)

  return 1 if num in (0, 1) else num * factorial(num - 1		)


if __name__ == "__main__":
       import doctest

       doctest.testmod()


