





'''simple docstring'''




lowercase__       : str         =       tuple[float, float, float]
lowercase__       : Dict         =       tuple[float, float, float]






def 			_lowerCAmelCase     (    __snake_case    :					Pointad					,				__snake_case    :					Pointad     )	->	Vectorad:
     __A		:					List[Any]						=			end_pointa[0] - end_pointa[0]
     __A		:					Union[str, Any]						=			end_pointa[1] - end_pointa[1]
     __A		:					Union[str, Any]						=			end_pointa[2] - end_pointa[2]
     return (x, y, z)






def 			_lowerCAmelCase     (    __snake_case    :					Vectorad					,				__snake_case    :					Vectorad     )	->	Vectorad:
     __A		:					Tuple						=			ab[1] * ac[2] - ab[2] * ac[1]  # *i
     __A		:					Union[str, Any]						=			(ab[0] * ac[2] - ab[2] * ac[0]) * -1  # *j
     __A		:					int						=			ab[0] * ac[1] - ab[1] * ac[0]  # *k
     return (x, y, z)






def 			_lowerCAmelCase     (    __snake_case    :					Vectorad					,				__snake_case    :					int     )	->	bool:
     return tuple(round(__snake_case					,				__snake_case     ) for x in vector     ) == (0, 0, 0)







def 			_lowerCAmelCase     (    __snake_case    :					Pointad					,				__snake_case    :					Pointad					,				__snake_case    :					Pointad					,				__snake_case    :					int = 10     )	->	bool:
     __A		:					int						=			create_vector(__snake_case					,				__snake_case     )
     __A		:					Union[str, Any]						=			create_vector(__snake_case					,				__snake_case     )
     return is_zero_vector(get_ad_vectors_cross(__snake_case					,				__snake_case     )					,				__snake_case     )





def 					_a							(					lowerCAmelCase    ,						lowerCAmelCase )->	List[str]:
		SCREAMING_SNAKE_CASE_					      =							[1]
		for i in range(2    ,						lowerCAmelCase ):
				factorials.append(factorials[-1] * i )
		assert 0 <= k < factorials[-1] * n, "k out of bounds"

		SCREAMING_SNAKE_CASE_					      =							[]
		SCREAMING_SNAKE_CASE_					      =							list(range(lowerCAmelCase ) )

		# Find permutation
		while factorials:
				SCREAMING_SNAKE_CASE_					      =							factorials.pop()
				SCREAMING_SNAKE_CASE_      ,				SCREAMING_SNAKE_CASE_					      =							divmod(lowerCAmelCase    ,						lowerCAmelCase )
				permutation.append(elements[number] )
				elements.remove(elements[number] )
		permutation.append(elements[0] )

		return permutation


if __name__ == "__main__":
						import doctest

						doctest.testmod()