



def      __lowercase       (			a__       )    ->			list:

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

							__SCREAMING_SNAKE_CASE									= []

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

														generate(k - 1							,       a__       )

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

							generate(len(a__       )							,       a__       )
							return res


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











lowerCAmelCase__		:					Optional[int]							=9.80_665






def      __lowercase       (			a__							,       a__							,       a__ = g       )    ->			float:

							if fluid_density <= 0:
														raise ValueError('Impossible fluid density'       )
							if volume < 0:
														raise ValueError('Impossible Object volume'       )
							if gravity <= 0:
														raise ValueError('Impossible Gravity'       )

							return fluid_density * gravity * volume


if __name__ == "__main__":
			import doctest

			# run doctest
			doctest.testmod()






