



'''simple docstring'''

from __future__ import annotations



def      __lowerCamelCase     (      lowerCAmelCase_						,			lowerCAmelCase_  )			->      list[list[int]]:
		_a     :      list[list[int]]        =							[]
		create_all_state(1						,			__UpperCAmelCase						,			__UpperCAmelCase						,			[]						,			__UpperCAmelCase  )
		return result



def      __lowerCamelCase     (      lowerCAmelCase_						,			lowerCAmelCase_						,			lowerCAmelCase_						,			lowerCAmelCase_						,			lowerCAmelCase_						,			)			->      None:
		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      __lowerCamelCase     (      lowerCAmelCase_  )			->      None:
		for i in total_list:
				print(*__UpperCAmelCase  )


if __name__ == "__main__":
							__lowerCAmelCase									=   4
							__lowerCAmelCase									=   2
							__lowerCAmelCase									=   generate_all_combinations(n, k)
							print_all_state(total_list)











def 		lowerCAmelCase_    (  __UpperCAmelCase:			int      )      ->	int:
    if not isinstance(__UpperCAmelCase		,   __UpperCAmelCase      ) or number < 0:
        raise ValueError('''Input must be a non-negative integer'''      )

    UpperCamelCase__							:				Optional[Any]          =      0
    while number:
        # This way we arrive at next set bit (next 1) instead of looping
        # through each bit and checking for 1s hence the
        # loop won't run 32 times it will only run the number of `1` times
        number &= number - 1
        count += 1
    return count


if __name__ == "__main__":
  import doctest

  doctest.testmod()

