
def        a_		(       __lowercase   :	list ) ->  list:

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

			_snake_case		=			[]

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

						generate(k - 1       ,					__lowercase )

						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       ,					__lowercase )

			generate(len(__lowercase )       ,					__lowercase )
			return res


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

def        a_		(       __lowercase   :	str ) ->  int:
			_snake_case		=			hex_num.strip()
			if not hex_num:
						raise ValueError('No value was passed to the function' )

			_snake_case		=			hex_num[0] == '-'
			if is_negative:
						_snake_case		=			hex_num[1:]

			try:
						_snake_case		=			int(__lowercase       ,					16 )
			except ValueError:
						raise ValueError('Invalid value was passed to the function' )

			_snake_case		=			''
			while int_num > 0:
						_snake_case		=			str(int_num % 2 ) + bin_str
						int_num >>= 1

			return int(('-' + bin_str) if is_negative else bin_str )


if __name__ == "__main__":
			import doctest

			doctest.testmod()