


import operator as op


UpperCAmelCase_   :				Dict						      =		'scaler.pt'
UpperCAmelCase_   :				Optional[Any]						      =		'pytorch_model'
UpperCAmelCase_   :				List[str]						      =		'random_states'
UpperCAmelCase_   :				str						      =		'optimizer'
UpperCAmelCase_   :				Union[str, Any]						      =		'scheduler'
UpperCAmelCase_   :				Dict						      =		'pytorch_model.bin'
UpperCAmelCase_   :				int						      =		'pytorch_model.bin.index.json'
UpperCAmelCase_   :				List[str]						      =		'model.safetensors'
UpperCAmelCase_   :				str						      =		'model.safetensors.index.json'
UpperCAmelCase_   :				int						      =		'1.10.2'
UpperCAmelCase_   :				List[Any]						      =		'py38'
UpperCAmelCase_   :				Union[str, Any]						      =		'4.17.0'
UpperCAmelCase_   :				Any						      =		['ml.p3.16xlarge', 'ml.p3dn.24xlarge', 'ml.p4dn.24xlarge']
UpperCAmelCase_   :				str						      =		['FULL_SHARD', 'SHARD_GRAD_OP', 'NO_SHARD', 'HYBRID_SHARD', 'HYBRID_SHARD_ZERO2']
UpperCAmelCase_   :				Optional[Any]						      =		['TRANSFORMER_BASED_WRAP', 'SIZE_BASED_WRAP', 'NO_WRAP']
UpperCAmelCase_   :				Optional[int]						      =		['BACKWARD_PRE', 'BACKWARD_POST', 'NO_PREFETCH']
UpperCAmelCase_   :				Optional[Any]						      =		['FULL_STATE_DICT', 'LOCAL_STATE_DICT', 'SHARDED_STATE_DICT']
UpperCAmelCase_   :				List[str]						      =		'2.0.1'
UpperCAmelCase_   :				Tuple						      =		['pdsh', 'standard', 'openmpi', 'mvapich']
UpperCAmelCase_   :				Optional[Any]						      =		['default', 'reduce-overhead', 'max-autotune']

UpperCAmelCase_   :				int						      =		{'>': op.gt, '>=': op.ge, '==': op.eq, '!=': op.ne, '<=': op.le, '<': op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
UpperCAmelCase_   :				Dict						      =		[
    'nnodes',
    'nproc_per_node',
    'rdzv_backend',
    'rdzv_endpoint',
    'rdzv_id',
    'rdzv_conf',
    'standalone',
    'max_restarts',
    'monitor_interval',
    'start_method',
    'role',
    'module',
    'm',
    'no_python',
    'run_path',
    'log_dir',
    'r',
    'redirects',
    't',
    'tee',
    'node_rank',
    'master_addr',
    'master_port',
]

UpperCAmelCase_   :				Any						      =		['DEEPSPEED', 'MULTI_GPU', 'FSDP', 'MEGATRON_LM']
UpperCAmelCase_   :				Optional[int]						      =		['DEEPSPEED', 'MULTI_XPU', 'FSDP']






def  SCREAMING_SNAKE_CASE_		(    __A				:    list       )			->	list:

       """simple docstring"""

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

       a_      :	Optional[Any]							=						[]

       def generate(__A				:    int						,					__A				:    list       ):
              a_      :	str							=						[0] * n
              res.append(tuple(__A       )       )

              a_      :	Optional[int]							=						0
              while i < n:
                     if c[i] < i:
                            if i % 2 == 0:
                                   a_							,	a_      :	Dict							=						arr[i], arr[0]
                            else:
                                   a_							,	a_      :	Union[str, Any]							=						arr[i], arr[c[i]]
                            res.append(tuple(__A       )       )
                            c[i] += 1
                            a_      :	Dict							=						0
                     else:
                            a_      :	Optional[Any]							=						0
                            i += 1

       generate(len(__A       )						,					__A       )
       return res


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


