



from __future__ import annotations






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						_UpperCamelCase :		Union[str, Any]			    =       []
						create_all_state(1  ,  __UpperCamelCase  ,  __UpperCamelCase  ,  []  ,  __UpperCamelCase							)
						return result






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_  ,  ):


						if level == 0:
												total_list.append(current_list[:]							)
												return

						for i in range(__UpperCamelCase  ,  total_number - level + 2							):
												current_list.append(__UpperCamelCase							)
												create_all_state(i + 1  ,  __UpperCamelCase  ,  level - 1  ,  __UpperCamelCase  ,  __UpperCamelCase							)
												current_list.pop()






def A__   (					UpperCAmelCase_							):


						for i in total_list:
												print(*__UpperCamelCase							)


if __name__ == "__main__":
					snake_case_			:     Dict  	=  4
					snake_case_			:     Dict  	=  2
					snake_case_			:     Union[str, Any]  	=  generate_all_combinations(n, k)
					print_all_state(total_list)







'''simple docstring'''
from __future__ import annotations






def A__   (					UpperCAmelCase_							):
						if not nums:
												return 0
						_UpperCamelCase :		Any			    =       nums[0]
						_UpperCamelCase :		Optional[int]			    =       0
						for num in nums[1:]:
												_UpperCamelCase    ,      _UpperCamelCase :		Optional[Any]			    =       (
												    max_excluding + num,
												    max(UpperCAmelCase_  ,  UpperCAmelCase_							),
												)
						return max(UpperCAmelCase_  ,  UpperCAmelCase_							)


if __name__ == "__main__":
					import doctest

					doctest.testmod()


