


'''simple docstring'''






from __future__ import annotations





def lowerCamelCase__      (						__lowerCamelCase	:							list[int | str]							):







   '''simple docstring'''




   create_state_space_tree(snake_case_	,   []	,   0	,   [0 for i in range(len(snake_case_							)							)]							)





def lowerCamelCase__      (						__lowerCamelCase	:							list[int | str]	,   __lowerCamelCase	:							list[int | str]	,   __lowerCamelCase	:							int	,   __lowerCamelCase	:							list[int]	,   ):







   '''simple docstring'''




   if index == len(snake_case_							):
      print(snake_case_							)
      return

   for i in range(len(snake_case_							)							):
      if not index_used[i]:
         current_sequence.append(sequence[i]							)
         _UpperCAmelCase       :       Optional[int]							   =True
         create_state_space_tree(snake_case_	,   snake_case_	,   index + 1	,   snake_case_							)
         current_sequence.pop()
         _UpperCAmelCase       :       List[str]							   =False
lowercase							=[3, 1, 2, 4]
generate_all_permutations(sequence)

lowercase							=["A", "B", "C"]




generate_all_permutations(sequence_a)





'''simple docstring'''






from string import ascii_uppercase

lowercase							={str(ord(c) - 55): c for c in ascii_uppercase}





def lowerCamelCase__      (						__lowerCamelCase	:							int	,   __lowerCamelCase	:							int							):







   '''simple docstring'''




   if isinstance(__lowerCamelCase	,   __lowerCamelCase							):
      raise TypeError('int() can\'t convert non-string with explicit base'							)
   if num < 0:
      raise ValueError('parameter must be positive int'							)
   if isinstance(__lowerCamelCase	,   __lowerCamelCase							):
      raise TypeError('\'str\' object cannot be interpreted as an integer'							)
   if isinstance(__lowerCamelCase	,   __lowerCamelCase							):
      raise TypeError('\'float\' object cannot be interpreted as an integer'							)
   if base in (0, 1):
      raise ValueError('base must be >= 2'							)
   if base > 3_6:
      raise ValueError('base must be <= 36'							)
   _UpperCAmelCase       :       Union[str, Any]							   =''
   _UpperCAmelCase       :       Optional[int]							   =0
   _UpperCAmelCase       :       str							   =0
   while div != 1:
      _UpperCAmelCase   ,	_UpperCAmelCase       :       int							   =divmod(__lowerCamelCase	,   __lowerCamelCase							)
      if base >= 1_1 and 9 < mod < 3_6:
         _UpperCAmelCase       :       str							   =ALPHABET_VALUES[str(__lowerCamelCase							)]
      else:
         _UpperCAmelCase       :       Any							   =str(__lowerCamelCase							)
      new_value += actual_value
      _UpperCAmelCase       :       Union[str, Any]							   =num // base
      _UpperCAmelCase       :       Dict							   =div
      if div == 0:
         return str(new_value[::-1]							)
      elif div == 1:
         new_value += str(__lowerCamelCase							)
         return str(new_value[::-1]							)

   return new_value[::-1]


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 for base in range(2, 37):
  for num in range(1000):
   assert int(decimal_to_any(num, base), base) == num, (
       num,
       base,
       decimal_to_any(num, base),
       int(decimal_to_any(num, base), base),
   )

