



"""simple docstring"""




def 		__snake_case		( SCREAMING_SNAKE_CASE__      :		list							)    ->  list:





     '''simple docstring'''

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

     _UpperCAmelCase     :      List[str]														=       []

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

          generate(k - 1		,    SCREAMING_SNAKE_CASE__							)

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

     generate(len(SCREAMING_SNAKE_CASE__							)		,    SCREAMING_SNAKE_CASE__							)
     return res


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





"""simple docstring"""




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowerCAmelCase							:   List[Any]				=				{
    "configuration_lilt": ["LILT_PRETRAINED_CONFIG_ARCHIVE_MAP", "LiltConfig"],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase							:   int				=				[
     "LILT_PRETRAINED_MODEL_ARCHIVE_LIST",
     "LiltForQuestionAnswering",
     "LiltForSequenceClassification",
     "LiltForTokenClassification",
     "LiltModel",
     "LiltPreTrainedModel",
 ]

if TYPE_CHECKING:
 from .configuration_lilt import LILT_PRETRAINED_CONFIG_ARCHIVE_MAP, LiltConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_lilt import (
      LILT_PRETRAINED_MODEL_ARCHIVE_LIST,
      LiltForQuestionAnswering,
      LiltForSequenceClassification,
      LiltForTokenClassification,
      LiltModel,
      LiltPreTrainedModel,
  )

else:
 import sys

 _lowerCAmelCase							:   Optional[int]				=				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
