


def 				lowerCAmelCase__	(    lowerCamelCase					:      Tuple       ):

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

       _A					:     List[str]     = []

       def generate(lowerCamelCase					:      str  ,lowerCamelCase					:      Optional[int]       ):
              if k == 1:
                     res.append(tuple(arr[:]       )       )
                     return

              generate(k - 1  ,lowerCamelCase       )

              for i in range(k - 1       ):
                     if k % 2 == 0:  # k is even
                            _A  ,			_A					:     Tuple     = arr[k - 1], arr[i]
                     else:  # k is odd
                            _A  ,			_A					:     Optional[int]     = arr[k - 1], arr[0]
                     generate(k - 1  ,lowerCamelCase       )

       generate(len(lowerCamelCase       )  ,lowerCamelCase       )
       return res


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










'''simple docstring'''







from __future__ import annotations


class 			__lowerCamelCase			:
    """simple docstring"""


    def __init__(  self      :							Optional[Any]				,							SCREAMING_SNAKE_CASE      :							Tuple=None):
           _A					:     Any     = data
           _A					:     Optional[Any]     = None


    def __repr__(  self      :							List[str]):
           _A					:     List[Any]     = []
           _A					:     Any     = self
           while temp:
                  string_rep.append(F'{temp.data}')
                  _A					:     List[Any]     = temp.next
           return "->".join(SCREAMING_SNAKE_CASE)






def 				lowerCAmelCase__	(    lowerCamelCase					:      list       ):
       if not elements_list:
              raise Exception('The Elements List is empty'       )

       _A					:     Union[str, Any]     = Node(elements_list[0]       )
       for i in range(1  ,len(lowerCamelCase       )       ):
              _A					:     Dict     = Node(elements_list[i]       )
              _A					:     int     = current.next
       return head






def 				lowerCAmelCase__	(    lowerCamelCase					:      Node       ):
       if head_node is not None and isinstance(lowerCamelCase  ,lowerCamelCase       ):
              print_reverse(head_node.next       )
              print(head_node.data       )






def 				lowerCAmelCase__	(    ):
       from doctest import testmod

       testmod()

       _A					:     List[str]     = make_linked_list([14, 52, 14, 12, 43]       )
       print('Linked List:'       )
       print(lowerCamelCase       )
       print('Elements in Reverse:'       )
       print_reverse(lowerCamelCase       )


if __name__ == "__main__":
   main()






