




def 					_a							(					lowerCAmelCase    ,						lowerCAmelCase    ,						lowerCAmelCase    ,						lowerCAmelCase )->	List[Any]:
		if height >= 1:
				move_tower(height - 1    ,						lowerCAmelCase    ,						lowerCAmelCase    ,						lowerCAmelCase )
				move_disk(lowerCAmelCase    ,						lowerCAmelCase )
				move_tower(height - 1    ,						lowerCAmelCase    ,						lowerCAmelCase    ,						lowerCAmelCase )


def 					_a							(					lowerCAmelCase    ,						lowerCAmelCase )->	List[Any]:
		print('moving disk from'    ,						lowerCAmelCase    ,						'to'    ,						lowerCAmelCase )


def 					_a							(					)->	Optional[int]:
		SCREAMING_SNAKE_CASE_					      =							int(input('Height of hanoi: ' ).strip() )
		move_tower(lowerCAmelCase    ,						'A'    ,						'B'    ,						'C' )


if __name__ == "__main__":
						main()





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()