'''simple docstring'''

def snake_case_      (					__snake_case  :							str)			->					int:
   lowerCAmelCase_			=      hex_num.strip()
   if not hex_num:
      raise ValueError('''No value was passed to the function''')

   lowerCAmelCase_			=      hex_num[0] == '''-'''
   if is_negative:
      lowerCAmelCase_			=      hex_num[1:]

   try:
      lowerCAmelCase_			=      int(__snake_case	,   16)
   except ValueError:
      raise ValueError('''Invalid value was passed to the function''')

   lowerCAmelCase_			=      ''''''
   while int_num > 0:
      lowerCAmelCase_			=      str(int_num % 2) + bin_str
      int_num >>= 1

   return int(('''-''' + bin_str) if is_negative else bin_str)


if __name__ == "__main__":
 import doctest

 doctest.testmod()






'''simple docstring'''

from __future__ import annotations



def snake_case_      (					__snake_case  :							list[int | str])			->					None:
   create_state_space_tree(__snake_case	,   []	,   0	,   [0 for i in range(len(__snake_case))])



def snake_case_      (					__snake_case  :							list[int | str]	,   __snake_case  :							list[int | str]	,   __snake_case  :							int	,   __snake_case  :							list[int]	,   )			->					None:

   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])
         lowerCAmelCase_			=      True
         create_state_space_tree(__snake_case	,   __snake_case	,   index + 1	,   __snake_case)
         current_sequence.pop()
         lowerCAmelCase_			=      False
A_     :						list[int | str]    							=[3, 1, 2, 4]
generate_all_permutations(sequence)

A_     :						list[int | str]    							=["A", "B", "C"]






generate_all_permutations(sequence_a)





