






"""simple docstring"""






def       _A    (__a							)				-> list:
    """simple docstring"""






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

        for j in range(__a					,       0					,       -1							):
            if unsorted[j] < unsorted[j - 1]:
                SCREAMING_SNAKE_CASE_   :						Optional[Any]							=	unsorted[j - 1], unsorted[j]
                SCREAMING_SNAKE_CASE_   :						str							=	True

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

        if not swapped:
            break
    return unsorted


if __name__ == "__main__":
  import doctest

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










"""simple docstring"""






def       _A    (__a = 1_00							)				-> int:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_   :						int							=	(n * (n + 1) // 2) ** 2
    SCREAMING_SNAKE_CASE_   :						Optional[Any]							=	n * (n + 1) * (2 * n + 1) // 6
    return sum_cubes - sum_squares


if __name__ == "__main__":
  print(f'''{solution() = }''')


