






from __future__ import annotations






def 				A	(			a_   )	->		list[int]:
					__UpperCamelCase :   Optional[int]									=[0] * max_one

					for i in range(0				,a_   ):
										__UpperCamelCase :   Optional[int]									=i

					for i in range(2				,a_   ):
										if totients[i] == i:
															for j in range(a_				,a_				,a_   ):
																				totients[j] -= totients[j] // i

					return totients






def 				A	(			a_				,a_   )	->		bool:
					return sorted(str(a_   )   ) == sorted(str(a_   )   )






def 				A	(			a_ = 10_000_000   )	->		int:
					__UpperCamelCase :   List[str]									=1  # i
					__UpperCamelCase :   int									=0  # φ(i)
					__UpperCamelCase :   List[str]									=get_totients(max_n + 1   )

					for i in range(2				,max_n + 1   ):
										__UpperCamelCase :   Optional[Any]									=totients[i]

										if i * min_denominator < min_numerator * t and has_same_digits(a_				,a_   ):
															__UpperCamelCase :   List[Any]									=i
															__UpperCamelCase :   int									=t

					return min_numerator


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









from typing import Callable






def 				A	(			a_   )	->		List[str]:

					def wrapper(a_   ):
										__UpperCamelCase :   Dict									=function_with_docstring.__doc__
										return target_function

					return wrapper

