



def     SCREAMING_SNAKE_CASE(      __UpperCamelCase )	->						list:

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

				a__	:							Optional[int]      						= []

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

								generate(k - 1	,				__UpperCamelCase )

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

				generate(len(__UpperCamelCase )	,				__UpperCamelCase )
				return res


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







import unittest

from knapsack import knapsack as k


class 				_a						(       unittest.TestCase			):





							'''simple docstring'''

							def 		_A	(							self				):







											"""simple docstring"""



											a__	:							List[str]      						= 0
											a__	:							Union[str, Any]      						= [0]
											a__	:							Optional[Any]      						= [0]
											a__	:							Tuple      						= len(__UpperCAmelCase				)
											self.assertEqual(k.knapsack(__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase				) ,					0				)

											a__	:							Optional[Any]      						= [60]
											a__	:							Tuple      						= [10]
											a__	:							Optional[Any]      						= len(__UpperCAmelCase				)
											self.assertEqual(k.knapsack(__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase				) ,					0				)



							def 		_A	(							self				):







											"""simple docstring"""



											a__	:							Dict      						= 3
											a__	:							Optional[int]      						= [1, 2, 3]
											a__	:							List[Any]      						= [3, 2, 1]
											a__	:							List[Any]      						= len(__UpperCAmelCase				)
											self.assertEqual(k.knapsack(__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase				) ,					5				)




							def 		_A	(							self				):







											"""simple docstring"""



											a__	:							List[Any]      						= 50
											a__	:							Union[str, Any]      						= [60, 100, 120]
											a__	:							str      						= [10, 20, 30]
											a__	:							Union[str, Any]      						= len(__UpperCAmelCase				)
											self.assertEqual(k.knapsack(__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase				) ,					220				)


if __name__ == "__main__":
						unittest.main()


