




def 			__magic_name__				( A		:					list   ):






			'''simple docstring'''







			def merge(A		:					list,  A		:					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(A   ) <= 1:
						return collection
			a    =			len(A   ) // 2
			return merge(merge_sort(collection[:mid]   ),  merge_sort(collection[mid:]   )   )


if __name__ == "__main__":
		import doctest

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










def   _SCREAMING_SNAKE_CASE	( SCREAMING_SNAKE_CASE       ):
  if not nums:  # Makes sure that the list is not empty
    raise ValueError('''List is empty'''       )

  A_      :				Optional[int]		     =					sum(SCREAMING_SNAKE_CASE       ) / len(SCREAMING_SNAKE_CASE       )  # Calculate the average
  return sum(abs(x - average       ) for x in nums       ) / len(SCREAMING_SNAKE_CASE       )


if __name__ == "__main__":
     import doctest

     doctest.testmod()




