




def 	_a      (						SCREAMING_SNAKE_CASE_							:				list     ):



					def merge(SCREAMING_SNAKE_CASE_							:				list      ,      SCREAMING_SNAKE_CASE_							:				list     ) -> list:

										def _merge():
															while left and right:
																				yield (left if left[0] <= right[0] else right).pop(0     )
															yield from left
															yield from right

										return list(_merge()     )

					if len(SCREAMING_SNAKE_CASE_     ) <= 1:
										return collection
					__lowerCAmelCase				   =       len(SCREAMING_SNAKE_CASE_     ) // 2
					return merge(merge_sort(collection[:mid]     )      ,      merge_sort(collection[mid:]     )     )


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					UpperCamelCase__    			=			input("""Enter numbers separated by a comma:\n""").strip()
					UpperCamelCase__    			=			[int(item) for item in user_input.split(""",""")]
					print(*merge_sort(unsorted), sep=""",""")










def 			_SCREAMING_SNAKE_CASE			(							lowercase	:       list     ):


      '''simple docstring'''



      for i in range(len(lowercase     ) - 1	,							0	,							-1     ):
            lowerCamelCase_		     =    False

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

            for j in range(lowercase     ):
                  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()
 lowerCamelCase				:		Any     =   input("Enter numbers separated by a comma:\n").strip()
 lowerCamelCase				:		Dict     =   [int(item) for item in user_input.split(",")]
 print(F"""{cocktail_shaker_sort(unsorted) = }""")



