


"""simple docstring"""
import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible





class        snake_case__       (unittest.TestCase):





							'''simple docstring'''

							def 						lowerCAmelCase    (			self							: List[Any]    )   ->Dict:



														"""simple docstring"""



														snake_case_          =						[
														    'safety_checker/pytorch_model.bin',
														    'safety_checker/model.safetensors',
														    'vae/diffusion_pytorch_model.bin',
														    'vae/diffusion_pytorch_model.safetensors',
														    'text_encoder/pytorch_model.bin',
														    'text_encoder/model.safetensors',
														    'unet/diffusion_pytorch_model.bin',
														    'unet/diffusion_pytorch_model.safetensors',
														]
														self.assertTrue(is_safetensors_compatible(_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: Any    )   ->Optional[Any]:



														"""simple docstring"""



														snake_case_          =						[
														    'unet/diffusion_pytorch_model.bin',
														    'unet/diffusion_pytorch_model.safetensors',
														]
														self.assertTrue(is_safetensors_compatible(_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: List[Any]    )   ->str:



														"""simple docstring"""



														snake_case_          =						[
														    'safety_checker/pytorch_model.bin',
														    'safety_checker/model.safetensors',
														    'vae/diffusion_pytorch_model.bin',
														    'vae/diffusion_pytorch_model.safetensors',
														    'text_encoder/pytorch_model.bin',
														    'text_encoder/model.safetensors',
														    'unet/diffusion_pytorch_model.bin',
														    # Removed: 'unet/diffusion_pytorch_model.safetensors',
														]
														self.assertFalse(is_safetensors_compatible(_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: List[Any]    )   ->List[str]:



														"""simple docstring"""



														snake_case_          =						[
														    'text_encoder/pytorch_model.bin',
														    'text_encoder/model.safetensors',
														]
														self.assertTrue(is_safetensors_compatible(_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: Dict    )   ->str:



														"""simple docstring"""



														snake_case_          =						[
														    'safety_checker/pytorch_model.bin',
														    'safety_checker/model.safetensors',
														    'vae/diffusion_pytorch_model.bin',
														    'vae/diffusion_pytorch_model.safetensors',
														    'text_encoder/pytorch_model.bin',
														    # Removed: 'text_encoder/model.safetensors',
														    'unet/diffusion_pytorch_model.bin',
														    'unet/diffusion_pytorch_model.safetensors',
														]
														self.assertFalse(is_safetensors_compatible(_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: Tuple    )   ->Optional[int]:



														"""simple docstring"""



														snake_case_          =						[
														    'safety_checker/pytorch_model.fp16.bin',
														    'safety_checker/model.fp16.safetensors',
														    'vae/diffusion_pytorch_model.fp16.bin',
														    'vae/diffusion_pytorch_model.fp16.safetensors',
														    'text_encoder/pytorch_model.fp16.bin',
														    'text_encoder/model.fp16.safetensors',
														    'unet/diffusion_pytorch_model.fp16.bin',
														    'unet/diffusion_pytorch_model.fp16.safetensors',
														]
														snake_case_          =						'fp16'
														self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						,    variant=_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: Tuple    )   ->Dict:



														"""simple docstring"""



														snake_case_          =						[
														    'unet/diffusion_pytorch_model.fp16.bin',
														    'unet/diffusion_pytorch_model.fp16.safetensors',
														]
														snake_case_          =						'fp16'
														self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						,    variant=_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: str    )   ->Any:



														"""simple docstring"""



														snake_case_          =						[
														    'unet/diffusion_pytorch_model.bin',
														    'unet/diffusion_pytorch_model.safetensors',
														]
														snake_case_          =						'fp16'
														self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						,    variant=_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: Tuple    )   ->Dict:



														"""simple docstring"""



														snake_case_          =						[
														    'safety_checker/pytorch_model.fp16.bin',
														    'safety_checker/model.fp16.safetensors',
														    'vae/diffusion_pytorch_model.fp16.bin',
														    'vae/diffusion_pytorch_model.fp16.safetensors',
														    'text_encoder/pytorch_model.fp16.bin',
														    'text_encoder/model.fp16.safetensors',
														    'unet/diffusion_pytorch_model.fp16.bin',
														    # Removed: 'unet/diffusion_pytorch_model.fp16.safetensors',
														]
														snake_case_          =						'fp16'
														self.assertFalse(is_safetensors_compatible(_UpperCAmelCase						,    variant=_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: str    )   ->int:



														"""simple docstring"""



														snake_case_          =						[
														    'text_encoder/pytorch_model.fp16.bin',
														    'text_encoder/model.fp16.safetensors',
														]
														snake_case_          =						'fp16'
														self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						,    variant=_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: str    )   ->Optional[Any]:



														"""simple docstring"""



														snake_case_          =						[
														    'text_encoder/pytorch_model.bin',
														    'text_encoder/model.safetensors',
														]
														snake_case_          =						'fp16'
														self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						,    variant=_UpperCAmelCase    )    )



							def 						lowerCAmelCase    (			self							: List[Any]    )   ->List[str]:



														"""simple docstring"""



														snake_case_          =						[
														    'safety_checker/pytorch_model.fp16.bin',
														    'safety_checker/model.fp16.safetensors',
														    'vae/diffusion_pytorch_model.fp16.bin',
														    'vae/diffusion_pytorch_model.fp16.safetensors',
														    'text_encoder/pytorch_model.fp16.bin',
														    # 'text_encoder/model.fp16.safetensors',
														    'unet/diffusion_pytorch_model.fp16.bin',
														    'unet/diffusion_pytorch_model.fp16.safetensors',
														]
														snake_case_          =						'fp16'
														self.assertFalse(is_safetensors_compatible(_UpperCAmelCase						,    variant=_UpperCAmelCase    )    )







"""simple docstring"""
def   _a			( _SCREAMING_SNAKE_CASE			)      ->			list:

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

							snake_case_          =						[]

							def generate(_SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			):
														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
																												snake_case_    ,  snake_case_          =						arr[k - 1], arr[i]
																					else:  # k is odd
																												snake_case_    ,  snake_case_          =						arr[k - 1], arr[0]
																					generate(k - 1			,	_SCREAMING_SNAKE_CASE			)

							generate(len(_SCREAMING_SNAKE_CASE			)			,	_SCREAMING_SNAKE_CASE			)
							return res


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



