


def   _UpperCAmelCase       (     UpperCAmelCase      :			list      ):
      """simple docstring"""




      for i in range(len(UpperCAmelCase      ) - 1						,	0						,	-1      ):
            __lowerCamelCase     :      Any       						=						False

            for j in range(UpperCAmelCase						,	0						,	-1      ):
                  if unsorted[j] < unsorted[j - 1]:
                        __lowerCamelCase     :      str       						=						unsorted[j - 1], unsorted[j]
                        __lowerCamelCase     :      Union[str, Any]       						=						True

            for j in range(UpperCAmelCase      ):
                  if unsorted[j] > unsorted[j + 1]:
                        __lowerCamelCase     :      Any       						=						unsorted[j + 1], unsorted[j]
                        __lowerCamelCase     :      Any       						=						True

            if not swapped:
                  break
      return unsorted


if __name__ == "__main__":
    import doctest

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







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCamelCase    :						Any     =							{
    'configuration_timesformer': ['TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TimesformerConfig'],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __UpperCamelCase    :						int     =							[
        'TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
        'TimesformerModel',
        'TimesformerForVideoClassification',
        'TimesformerPreTrainedModel',
    ]

if TYPE_CHECKING:
    from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_timesformer import (
            TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            TimesformerForVideoClassification,
            TimesformerModel,
            TimesformerPreTrainedModel,
        )

else:
    import sys

    __UpperCamelCase    :						List[Any]     =							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



