



"""simple docstring"""






def 			snake_case		(		lowerCAmelCase_	)						->				list:

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

  _snake_case   	=      []

  def generate(lowerCAmelCase_  ,						lowerCAmelCase_	):
    _snake_case   	=      [0] * n
    res.append(tuple(lowerCAmelCase_	)	)

    _snake_case   	=      0
    while i < n:
      if c[i] < i:
        if i % 2 == 0:
          _snake_case	,     _snake_case   	=      arr[i], arr[0]
        else:
          _snake_case	,     _snake_case   	=      arr[i], arr[c[i]]
        res.append(tuple(lowerCAmelCase_	)	)
        c[i] += 1
        _snake_case   	=      0
      else:
        _snake_case   	=      0
        i += 1

  generate(len(lowerCAmelCase_	)  ,						lowerCAmelCase_	)
  return res


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










"""simple docstring"""






from ..utils import DummyObject, requires_backends



class     UpperCAmelCase    (	metaclass=__SCREAMING_SNAKE_CASE  ):
   A__		:	Optional[int]           =  ['''torch''', '''scipy''']



   def __init__(       self    :	Any							,       *__lowerCamelCase    :	List[Any]							,       **__lowerCamelCase    :	Any				):



     """simple docstring"""
     requires_backends(self							,       ['''torch''', '''scipy''']				)



   @classmethod
   def    __UpperCAmelCase    (       cls    :	Dict							,       *__lowerCamelCase    :	List[str]							,       **__lowerCamelCase    :	Tuple				):



     """simple docstring"""
     requires_backends(cls							,       ['''torch''', '''scipy''']				)





   @classmethod
   def    __UpperCAmelCase    (       cls    :	int							,       *__lowerCamelCase    :	Union[str, Any]							,       **__lowerCamelCase    :	Tuple				):



     """simple docstring"""
     requires_backends(cls							,       ['''torch''', '''scipy''']				)





