





from __future__ import annotations


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase				)    ->  list[list[int]]:
    lowerCamelCase__					:   list[list[int]]      				=	[]
    lowerCamelCase__					:   list[int]      				=	[]
    lowerCamelCase__					:   Optional[Any]      				=	0
    lowerCamelCase__					:   Optional[int]      				=	sum(_UpperCAmelCase				)
    create_state_space_tree(_UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase				)
    return result


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase		,			)    ->  None:
    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]		,			)
_UpperCAmelCase       : Union[str, Any]			     =       [3, 34, 4, 12, 5, 2]
_UpperCAmelCase       : str			     =       9
_UpperCAmelCase       : Any			     =       generate_sum_of_subsets_soln(nums, max_sum)


print(*result)












import enum
import shutil
import sys


_UpperCAmelCase     ,_UpperCAmelCase       : List[Any]			     =       shutil.get_terminal_size()

_UpperCAmelCase       : Union[str, Any]			     =       {"""UP""": """A""", """DOWN""": """B""", """RIGHT""": """C""", """LEFT""": """D"""}

class      lowerCAmelCase							(      enum.Enum    ):
 UpperCAmelCase__									=	0
 UpperCAmelCase__									=	1


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase=""				)    ->  int:
    sys.stdout.write(str(_UpperCAmelCase				) + end				)
    sys.stdout.flush()


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase=""				)    ->  Union[str, Any]:
    forceWrite(F"""\u001b[{color}m{content}\u001b[0m"""		,			_UpperCAmelCase				)


def  SCREAMING_SNAKE_CASE   ( )    ->  Dict:
    forceWrite('\r'				)


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase				)    ->  Optional[Any]:
    forceWrite(F"""\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}"""				)


def  SCREAMING_SNAKE_CASE   ( )    ->  int:
    forceWrite(' ' * TERMINAL_WIDTH				)
    reset_cursor()


def  SCREAMING_SNAKE_CASE   ( )    ->  Optional[Any]:
    reset_cursor()
    forceWrite('-' * TERMINAL_WIDTH				)





