def      a__ (		__UpperCamelCase				):
      SCREAMING_SNAKE_CASE_          =  len(__UpperCamelCase				)
      while cur > 1:
            # Find the maximum number in arr
            SCREAMING_SNAKE_CASE_          =  arr.index(max(arr[0:cur]				)				)
            # Reverse from 0 to mi
            SCREAMING_SNAKE_CASE_          =  arr[mi::-1] + arr[mi + 1 : len(__UpperCamelCase				)]
            # Reverse whole list
            SCREAMING_SNAKE_CASE_          =  arr[cur - 1 :: -1] + arr[cur : len(__UpperCamelCase				)]
            cur -= 1
      return arr


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



from collections.abc import Callable


def      a__ (		__UpperCamelCase     ,      __UpperCamelCase     ,      __UpperCamelCase				):
      SCREAMING_SNAKE_CASE_          =  a
      SCREAMING_SNAKE_CASE_          =  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:
            SCREAMING_SNAKE_CASE_          =  start + (end - start) / 2.0
            while abs(start - mid				) > 1_0**-7:  # until precisely equals to 10^-7
                  if function(__UpperCamelCase				) == 0:
                        return mid
                  elif function(__UpperCamelCase				) * function(__UpperCamelCase				) < 0:
                        SCREAMING_SNAKE_CASE_          =  mid
                  else:
                        SCREAMING_SNAKE_CASE_          =  mid
                  SCREAMING_SNAKE_CASE_          =  start + (end - start) / 2.0
            return mid


def      a__ (		__UpperCamelCase				):
      return x**3 - 2 * x - 5


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

      import doctest

      doctest.testmod()


