




from __future__ import annotations




def 					lowerCamelCase__       (						A__       :					Tuple	):





       '''simple docstring'''



       for i in range(1  ,			len(matrix[0]	)	):
              matrix[0][i] += matrix[0][i - 1]

       # preprocessing the first column
       for i in range(1  ,			len(snake_case__	)	):
              matrix[i][0] += matrix[i - 1][0]

       # updating the path cost for current position
       for i in range(1  ,			len(snake_case__	)	):
              for j in range(1  ,			len(matrix[0]	)	):
                     matrix[i][j] += min(matrix[i - 1][j]  ,			matrix[i][j - 1]	)

       return matrix[-1][-1]


if __name__ == "__main__":
       import doctest

       doctest.testmod()







"""simple docstring"""




def     a__ (				snake_case__				)						->					list:

			if len(snake_case__				) < 2:
						return collection

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

						if low == high:
									return swapped

						lowerCamelCase			      =					low
						lowerCamelCase			      =					high

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

									left += 1
									right -= 1

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

									lowerCamelCase			      =					True

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

						return swapped or left_swap or right_swap

			lowerCamelCase			      =					True

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

			return collection


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



