
def 						SCREAMING_SNAKE_CASE__     (   __lowerCAmelCase				):

    if len(__lowerCAmelCase				) < 2:
        return collection

    def circle_sort_util(__lowerCAmelCase     ,		__lowerCAmelCase     ,		__lowerCAmelCase				) -> bool:
        snake_case__    =					False

        if low == high:
            return swapped

        snake_case__    =					low
        snake_case__    =					high

        while left < right:
            if collection[left] > collection[right]:
                snake_case__    ,       snake_case__    =					(
                    collection[right],
                    collection[left],
                )
                snake_case__    =					True

            left += 1
            right -= 1

        if left == right and collection[left] > collection[right + 1]:
            snake_case__    ,       snake_case__    =					(
                collection[right + 1],
                collection[left],
            )

            snake_case__    =					True

        snake_case__    =					low + int((high - low) / 2				)
        snake_case__    =					circle_sort_util(__lowerCAmelCase     ,		__lowerCAmelCase     ,		__lowerCAmelCase				)
        snake_case__    =					circle_sort_util(__lowerCAmelCase     ,		mid + 1     ,		__lowerCAmelCase				)

        return swapped or left_swap or right_swap

    snake_case__    =					True

    while is_not_sorted is True:
        snake_case__    =					circle_sort_util(__lowerCAmelCase     ,		0     ,		len(__lowerCAmelCase				) - 1				)

    return collection


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





def 						SCREAMING_SNAKE_CASE__     (   __lowerCAmelCase				):
    if any(not isinstance(__lowerCAmelCase     ,		__lowerCAmelCase				) or x < 0 for x in sequence				):
        raise TypeError("Sequence must be list of non-negative integers"				)
    for _ in range(len(__lowerCAmelCase				)				):
        for i, (rod_upper, rod_lower) in enumerate(zip(__lowerCAmelCase     ,		sequence[1:]				)				):
            if rod_upper > rod_lower:
                sequence[i] -= rod_upper - rod_lower
                sequence[i + 1] += rod_upper - rod_lower
    return sequence


if __name__ == "__main__":
     assert bead_sort([5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]
     assert bead_sort([7, 9, 4, 3, 5]) == [3, 4, 5, 7, 9]



