'''simple docstring'''
def  __lowerCamelCase       (      _UpperCamelCase  :  Tuple					):


      '''simple docstring'''


      UpperCAmelCase_      ,		UpperCAmelCase_            =  [], []
      while len(_UpperCamelCase					) > 1:
            UpperCAmelCase_      ,		UpperCAmelCase_            =  min(_UpperCamelCase					), max(_UpperCamelCase					)
            start.append(_UpperCamelCase					)
            end.append(_UpperCamelCase					)
            collection.remove(_UpperCamelCase					)
            collection.remove(_UpperCamelCase					)
      end.reverse()
      return start + collection + end


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






'''simple docstring'''
from collections.abc import Callable



def  __lowerCamelCase       (      _UpperCamelCase  :  Callable[[float], float]							,    _UpperCamelCase  :  float							,    _UpperCamelCase  :  float					):


      '''simple docstring'''


      UpperCAmelCase_            =  a
      UpperCAmelCase_            =  b
      if function(_UpperCamelCase					) == 0:  # one of the a or b is a root for the function
            return a
      elif function(_UpperCamelCase					) == 0:
            return b
      elif (
          function(_UpperCamelCase					) * function(_UpperCamelCase					) > 0
      ):  # if none of these are root and they are both positive or negative,
            # then this algorithm can't find the root
            raise ValueError('''could not find root in given interval.'''					)
      else:
            UpperCAmelCase_            =  start + (end - start) / 2.0
            while abs(start - mid					) > 10**-7:  # until precisely equals to 10^-7
                  if function(_UpperCamelCase					) == 0:
                        return mid
                  elif function(_UpperCamelCase					) * function(_UpperCamelCase					) < 0:
                        UpperCAmelCase_            =  mid
                  else:
                        UpperCAmelCase_            =  mid
                  UpperCAmelCase_            =  start + (end - start) / 2.0
            return mid



def  __lowerCamelCase       (      _UpperCamelCase  :  float					):


      '''simple docstring'''


      return x**3 - 2 * x - 5


if __name__ == "__main__":
      print(bisection(f, 1, 1000))

      import doctest

      doctest.testmod()





