

def 				snake_case_(_UpperCamelCase					)							->     list:



  """simple docstring"""






  for i in range(len(_UpperCamelCase					) - 1			,	0			,	-1					):
    _snake_case						=							False

    for j in range(_UpperCamelCase			,	0			,	-1					):
      if unsorted[j] < unsorted[j - 1]:
        _snake_case,					_snake_case						=							unsorted[j - 1], unsorted[j]
        _snake_case						=							True

    for j in range(_UpperCamelCase					):
      if unsorted[j] > unsorted[j + 1]:
        _snake_case,					_snake_case						=							unsorted[j + 1], unsorted[j]
        _snake_case						=							True

    if not swapped:
      break
  return unsorted


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 __A      		=     input('''Enter numbers separated by a comma:\n''').strip()
 __A      		=     [int(item) for item in user_input.split(''',''')]
 print(f'''{cocktail_shaker_sort(unsorted) = }''')




import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
 import ctypes
 import msvcrt  # noqa



 class   lowercase_   (  ctypes.Structure					):
       # _fields is a specific attr expected by ctypes
       UpperCamelCase_      :		List[Any]										=    [("size", ctypes.c_int), ("visible", ctypes.c_byte)]



def 				snake_case_()							->     int:



  """simple docstring"""






  if os.name == "nt":
    _snake_case						=							CursorInfo()
    _snake_case						=							ctypes.windll.kernelaa.GetStdHandle(-11					)
    ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCamelCase			,	ctypes.byref(_UpperCamelCase					)					)
    _snake_case						=							False
    ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCamelCase			,	ctypes.byref(_UpperCamelCase					)					)
  elif os.name == "posix":
    sys.stdout.write('''\033[?25l'''					)
    sys.stdout.flush()



def 				snake_case_()							->     Optional[Any]:



  """simple docstring"""






  if os.name == "nt":
    _snake_case						=							CursorInfo()
    _snake_case						=							ctypes.windll.kernelaa.GetStdHandle(-11					)
    ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCamelCase			,	ctypes.byref(_UpperCamelCase					)					)
    _snake_case						=							True
    ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCamelCase			,	ctypes.byref(_UpperCamelCase					)					)
  elif os.name == "posix":
    sys.stdout.write('''\033[?25h'''					)
    sys.stdout.flush()



@contextmanager
def 				snake_case_()							->     int:



  """simple docstring"""






  try:
    hide_cursor()
    yield
  finally:
    show_cursor()

