

'''simple docstring'''

def    A_  ( snake_case ):

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

  SCREAMING_SNAKE_CASE:int						      =					[]

  def generate(snake_case      ,       snake_case ):
    SCREAMING_SNAKE_CASE:Optional[int]						      =					[0] * n
    res.append(tuple(snake_case ) )

    SCREAMING_SNAKE_CASE:Tuple						      =					0
    while i < n:
      if c[i] < i:
        if i % 2 == 0:
          SCREAMING_SNAKE_CASE      ,    SCREAMING_SNAKE_CASE:Dict						      =					arr[i], arr[0]
        else:
          SCREAMING_SNAKE_CASE      ,    SCREAMING_SNAKE_CASE:Tuple						      =					arr[i], arr[c[i]]
        res.append(tuple(snake_case ) )
        c[i] += 1
        SCREAMING_SNAKE_CASE:List[Any]						      =					0
      else:
        SCREAMING_SNAKE_CASE:Union[str, Any]						      =					0
        i += 1

  generate(len(snake_case )      ,       snake_case )
  return res


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









'''simple docstring'''

from ..utils import DummyObject, requires_backends





class 							_snake_case (       metaclass=_a						):
   _A       :     Any       =					['''torch''', '''torchsde''']
   def __init__( self			:      Any     ,*SCREAMING_SNAKE_CASE__			:      int     ,**SCREAMING_SNAKE_CASE__			:      Tuple							):
     requires_backends(self     ,["torch", "torchsde"]							)
   @classmethod
   def     __UpperCamelCase						( cls			:      Dict     ,*SCREAMING_SNAKE_CASE__			:      Dict     ,**SCREAMING_SNAKE_CASE__			:      Optional[Any]							):
     requires_backends(cls     ,["torch", "torchsde"]							)







   @classmethod
   def     __UpperCamelCase						( cls			:      List[str]     ,*SCREAMING_SNAKE_CASE__			:      int     ,**SCREAMING_SNAKE_CASE__			:      Optional[Any]							):
     requires_backends(cls     ,["torch", "torchsde"]							)






