from __future__ import annotations




def    lowerCAmelCase_ (     __A,  __A							)     ->				list[list[int]]:







      '''simple docstring'''


      UpperCAmelCase__								=  []
      UpperCAmelCase__								=  []
      UpperCAmelCase__								=  0
      UpperCAmelCase__								=  sum(__A							)
      create_state_space_tree(__A,  __A,  __A,  __A,  __A,  __A							)
      return result




def    lowerCAmelCase_ (     __A,  __A,  __A,  __A,  __A,  __A,  )     ->				None:







      '''simple docstring'''


      if sum(__A							) > max_sum or (remaining_nums_sum + sum(__A							)) < max_sum:
            return
      if sum(__A							) == max_sum:
            result.append(__A							)
            return
      for index in range(__A,  len(__A							)							):
            create_state_space_tree(
                __A,  __A,  index + 1,  [*path, nums[index]],  __A,  remaining_nums_sum - nums[index],  )
UpperCamelCase__											=					[3, 3_4, 4, 1_2, 5, 2]
UpperCamelCase__											=					9
UpperCamelCase__											=					generate_sum_of_subsets_soln(nums, max_sum)







print(*result)







import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
 import ctypes
 import msvcrt  # noqa




 class A  (   ctypes.Structure     ):
       # _fields is a specific attr expected by ctypes
       UpperCamelCase__							:  List[Any]      =[('size', ctypes.c_int), ('visible', ctypes.c_byte)]




def 	a_      (    ):
       '''simple docstring'''





       if os.name == "nt":
              _lowerCamelCase       :		Optional[Any]		=CursorInfo()
              _lowerCamelCase       :		Dict		=ctypes.windll.kernelaa.GetStdHandle(-11     )
              ctypes.windll.kernelaa.GetConsoleCursorInfo(SCREAMING_SNAKE_CASE__		,			ctypes.byref(SCREAMING_SNAKE_CASE__     )     )
              _lowerCamelCase       :		Any		=False
              ctypes.windll.kernelaa.SetConsoleCursorInfo(SCREAMING_SNAKE_CASE__		,			ctypes.byref(SCREAMING_SNAKE_CASE__     )     )
       elif os.name == "posix":
              sys.stdout.write('\033[?25l'     )
              sys.stdout.flush()




def 	a_      (    ):
       '''simple docstring'''





       if os.name == "nt":
              _lowerCamelCase       :		Any		=CursorInfo()
              _lowerCamelCase       :		Optional[Any]		=ctypes.windll.kernelaa.GetStdHandle(-11     )
              ctypes.windll.kernelaa.GetConsoleCursorInfo(SCREAMING_SNAKE_CASE__		,			ctypes.byref(SCREAMING_SNAKE_CASE__     )     )
              _lowerCamelCase       :		Union[str, Any]		=True
              ctypes.windll.kernelaa.SetConsoleCursorInfo(SCREAMING_SNAKE_CASE__		,			ctypes.byref(SCREAMING_SNAKE_CASE__     )     )
       elif os.name == "posix":
              sys.stdout.write('\033[?25h'     )
              sys.stdout.flush()




@contextmanager
def 	a_      (    ):
       '''simple docstring'''





       try:
              hide_cursor()
              yield
       finally:
              show_cursor()


