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


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


from ..utils import DummyObject, requires_backends






class 		_lowerCamelCase		(   metaclass=UpperCamelCase_    ):
    __a  =      ["torch", "scipy"]
    def __init__(  self , *lowerCAmelCase , **lowerCAmelCase   )       ->					Any:
     requires_backends(self , ['''torch''', '''scipy''']   )
    @classmethod
    def 						UpperCamelCase_				(  cls , *lowerCAmelCase , **lowerCAmelCase   )       ->					List[str]:
     requires_backends(cls , ['''torch''', '''scipy''']   )



    @classmethod
    def 						UpperCamelCase_				(  cls , *lowerCAmelCase , **lowerCAmelCase   )       ->					Tuple:
     requires_backends(cls , ['''torch''', '''scipy''']   )

