

from __future__ import annotations







def 			A_      (    _UpperCAmelCase    ):
						create_state_space_tree(UpperCamelCase_				,	[]				,	0				,	[0 for i in range(len(UpperCamelCase_    )    )]    )







def 			A_      (    _UpperCAmelCase				,	_UpperCAmelCase				,	_UpperCAmelCase				,	_UpperCAmelCase				,	):


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

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

lowerCAmelCase							:  List[Any]   	=						["""A""", """B""", """C"""]



generate_all_permutations(sequence_a)









"""simple docstring"""





def   _A  (  UpperCamelCase_     :       list[int])	->						float:
   '''simple docstring'''


   if not nums:  # Makes sure that the list is not empty
      raise ValueError("List is empty")

   __lowercase								=						sum(UpperCamelCase_) / len(UpperCamelCase_)  # Calculate the average
   return sum(abs(x - average) for x in nums) / len(UpperCamelCase_)


if __name__ == "__main__":
   import doctest

   doctest.testmod()




