




"""simple docstring"""




import os
from distutils.util import strtobool



def        a__					(							snake_case__			,					snake_case__							)		->   Any:
			for e in env_keys:
						lowerCamelCase      =   int(os.environ.get(snake_case__			,					-1							)							)
						if val >= 0:
									return val
			return default



def        a__					(							snake_case__			,					snake_case__=False							)		->   Optional[int]:
			lowerCamelCase      =   os.environ.get(snake_case__			,					str(snake_case__							)							)
			return strtobool(snake_case__							) == 1  # As its name indicates `strtobool` actually returns an int...



def        a__					(							snake_case__			,					snake_case__="no"							)		->   Dict:
			lowerCamelCase      =   os.environ.get(snake_case__			,					str(snake_case__							)							)
			return value









"""simple docstring"""




def        a__					(							snake_case__							)		->   list:

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

			lowerCamelCase      =   []

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

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

			generate(len(snake_case__							)			,					snake_case__							)
			return res


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



