def       A__   (						snake_case_			:		list   ):

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

 SCREAMING_SNAKE_CASE__: Union[str, Any]=   []

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

  generate(k - 1							,					snake_case_   )

  for i in range(k - 1   ):
   if k % 2 == 0:  # k is even
    SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: Union[str, Any]=   arr[k - 1], arr[i]
   else:  # k is odd
    SCREAMING_SNAKE_CASE__,						SCREAMING_SNAKE_CASE__: Optional[int]=   arr[k - 1], arr[0]
   generate(k - 1							,					snake_case_   )

 generate(len(snake_case_   )							,					snake_case_   )
 return res


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





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE							    =							{'configuration_wavlm': ['WAVLM_PRETRAINED_CONFIG_ARCHIVE_MAP', 'WavLMConfig']}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  SCREAMING_SNAKE_CASE							    =							[
      'WAVLM_PRETRAINED_MODEL_ARCHIVE_LIST',
      'WavLMForAudioFrameClassification',
      'WavLMForCTC',
      'WavLMForSequenceClassification',
      'WavLMForXVector',
      'WavLMModel',
      'WavLMPreTrainedModel',
  ]

if TYPE_CHECKING:
  from .configuration_wavlm import WAVLM_PRETRAINED_CONFIG_ARCHIVE_MAP, WavLMConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_wavlm import (
        WAVLM_PRETRAINED_MODEL_ARCHIVE_LIST,
        WavLMForAudioFrameClassification,
        WavLMForCTC,
        WavLMForSequenceClassification,
        WavLMForXVector,
        WavLMModel,
        WavLMPreTrainedModel,
    )

else:
  import sys

  SCREAMING_SNAKE_CASE							    =							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



