



'''simple docstring'''





from __future__ import annotations

def        a_     (							_lowerCAmelCase       )      ->      None:
  create_state_space_tree(_lowerCAmelCase       ,[]       ,0       ,[0 for i in range(len(_lowerCAmelCase       )       )]       )

def        a_     (							_lowerCAmelCase       ,_lowerCAmelCase       ,_lowerCAmelCase       ,_lowerCAmelCase       ,)      ->      None:

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

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

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


generate_all_permutations(sequence_a)











'''simple docstring'''





def        a_     (							_lowerCAmelCase       )      ->      str:
  if not all(char in '01' for char in bin_string       ):
    raise ValueError('Non-binary value was passed to the function'       )
  if not bin_string:
    raise ValueError('Empty string was passed to the function'       )
  __lowerCamelCase       :       int           = ''
  while len(_lowerCAmelCase       ) % 3 != 0:
    __lowerCamelCase       :       str           = '0' + bin_string
  __lowerCamelCase       :       Union[str, Any]           = [
      bin_string[index : index + 3]
      for index in range(len(_lowerCAmelCase       )       )
      if index % 3 == 0
  ]
  for bin_group in bin_string_in_3_list:
    __lowerCamelCase       :       Tuple           = 0
    for index, val in enumerate(_lowerCAmelCase       ):
      oct_val += int(2 ** (2 - index) * int(_lowerCAmelCase       )       )
    oct_string += str(_lowerCAmelCase       )
  return oct_string


if __name__ == "__main__":
   from doctest import testmod

   testmod()






