


def   _UpperCamelCase				(						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_   )						->int:

   if exponent == 1:
      return base
   if exponent % 2 == 0:
      UpperCAmelCase							=     _modexpt(lowerCAmelCase_  ,						exponent // 2  ,						lowerCAmelCase_   ) % modulo_value
      return (x * x) % modulo_value
   else:
      return (base * _modexpt(lowerCAmelCase_  ,						exponent - 1  ,						lowerCAmelCase_   )) % modulo_value
def   _UpperCamelCase				(						lowerCAmelCase_ = 1_7_7_7  ,						lowerCAmelCase_ = 1_8_5_5  ,						lowerCAmelCase_ = 8   )						->int:
   UpperCAmelCase							=     base
   for _ in range(1  ,						lowerCAmelCase_   ):
      UpperCAmelCase							=     _modexpt(lowerCAmelCase_  ,						lowerCAmelCase_  ,						1_0**digits   )

   return result


if __name__ == "__main__":
      print(F"""{solution() = }""")







from __future__ import annotations
def   _UpperCamelCase				(						lowerCAmelCase_   )						->None:
   create_state_space_tree(lowerCAmelCase_  ,						[]  ,						0  ,						[0 for i in range(len(lowerCAmelCase_   )   )]   )
def   _UpperCamelCase				(						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]   )
         UpperCAmelCase							=     True
         create_state_space_tree(lowerCAmelCase_  ,						lowerCAmelCase_  ,						index + 1  ,						lowerCAmelCase_   )
         current_sequence.pop()
         UpperCAmelCase							=     False
__a     =			[3, 1, 2, 4]
generate_all_permutations(sequence)

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







generate_all_permutations(sequence_a)



