def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: list			)							->      list:







  """simple docstring"""





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


if __name__ == "__main__":
   import doctest

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

from __future__ import annotations



def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: list			)							->      float:







  """simple docstring"""





  if not nums:
    raise ValueError("""List is empty"""			)
  return sum(__UpperCamelCase			) / len(__UpperCamelCase			)


if __name__ == "__main__":
   import doctest

   doctest.testmod()
