




'''simple docstring'''

from __future__ import annotations


def __UpperCAmelCase	(   _UpperCAmelCase		:   Union[str, Any]		,				_UpperCAmelCase		:   List[Any]						)      ->      List[str]:
			__snake_case			=		[]
			__snake_case			=		[]
			__snake_case			=		0
			__snake_case			=		sum(_UpperCAmelCase						)
			create_state_space_tree(_UpperCAmelCase		,				_UpperCAmelCase		,				_UpperCAmelCase		,				_UpperCAmelCase		,				_UpperCAmelCase		,				_UpperCAmelCase						)
			return result


def __UpperCAmelCase	(   _UpperCAmelCase		:   Any		,				_UpperCAmelCase		:   Optional[int]		,				_UpperCAmelCase		:   Union[str, Any]		,				_UpperCAmelCase		:   Optional[int]		,				_UpperCAmelCase		:   Union[str, Any]		,				_UpperCAmelCase		:   Any		,				)      ->      Any:
			if sum(_UpperCAmelCase						) > max_sum or (remaining_nums_sum + sum(_UpperCAmelCase						)) < max_sum:
						return
			if sum(_UpperCAmelCase						) == max_sum:
						result.append(_UpperCAmelCase						)
						return
			for index in range(_UpperCAmelCase		,				len(_UpperCAmelCase						)						):
						create_state_space_tree(
						    _UpperCAmelCase		,				_UpperCAmelCase		,				index + 1		,				[*path, nums[index]]		,				_UpperCAmelCase		,				remaining_nums_sum - nums[index]		,				)
a       :						List[Any]								=		[3, 34, 4, 12, 5, 2]
a       :						Any								=		9
a       :						Tuple								=		generate_sum_of_subsets_soln(nums, max_sum)






print(*result)











'''simple docstring'''


def 						lowerCamelCase__   (				a							):
						if number < 0:
												raise ValueError('number must not be negative'							)
						return number & (number - 1) == 0


if __name__ == "__main__":
	import doctest

	doctest.testmod()

