
"""simple docstring"""


def 	lowerCamelCase__			(							UpperCAmelCase_				)->							Optional[Any]:







       """simple docstring"""
       UpperCamelCase					 =		len(UpperCAmelCase_				)
       while cur > 1:
              # Find the maximum number in arr
              UpperCamelCase					 =		arr.index(max(arr[0:cur]				)				)
              # Reverse from 0 to mi
              UpperCamelCase					 =		arr[mi::-1] + arr[mi + 1 : len(UpperCAmelCase_				)]
              # Reverse whole list
              UpperCamelCase					 =		arr[cur - 1 :: -1] + arr[cur : len(UpperCAmelCase_				)]
              cur -= 1
       return arr


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







"""simple docstring"""


def 	lowerCamelCase__			(							UpperCAmelCase_				)->							list:







       """simple docstring"""

       if len(UpperCAmelCase_				) <= 1:
              return [tuple(UpperCAmelCase_				)]

       UpperCamelCase					 =		[]

       def generate(UpperCAmelCase_		,      UpperCAmelCase_				):
              if k == 1:
                     res.append(tuple(arr[:]				)				)
                     return

              generate(k - 1		,      UpperCAmelCase_				)

              for i in range(k - 1				):
                     if k % 2 == 0:  # k is even
                            UpperCamelCase ,       UpperCamelCase					 =		arr[k - 1], arr[i]
                     else:  # k is odd
                            UpperCamelCase ,       UpperCamelCase					 =		arr[k - 1], arr[0]
                     generate(k - 1		,      UpperCAmelCase_				)

       generate(len(UpperCAmelCase_				)		,      UpperCAmelCase_				)
       return res


if __name__ == "__main__":
      SCREAMING_SNAKE_CASE      =     input("""Enter numbers separated by a comma:\n""").strip()
      SCREAMING_SNAKE_CASE      =     [int(item) for item in user_input.split(""",""")]
      print(heaps(arr))





