





'''simple docstring'''


def 	__a(SCREAMING_SNAKE_CASE_  :					list    ):



    '''simple docstring'''





    for i in range(len(SCREAMING_SNAKE_CASE_    ) - 1		,       0		,       -1    ):
        _lowerCAmelCase				=      False

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

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

        if not swapped:
            break
    return unsorted


if __name__ == "__main__":
       import doctest

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









'''simple docstring'''


def 	__a(SCREAMING_SNAKE_CASE_  :					int    ):



    '''simple docstring'''





    if not isinstance(SCREAMING_SNAKE_CASE_		,       SCREAMING_SNAKE_CASE_    ):
        raise TypeError("Input value must be an 'int' type"    )

    _lowerCAmelCase				=      0
    while number:
        position += 1
        number >>= 1

    return position


if __name__ == "__main__":
       import doctest

       doctest.testmod()


