


"""simple docstring"""




from __future__ import annotations





def 			a_   (  lowercase__   :int    ):
			__lowerCamelCase        =			[0] * max_one

			for i in range(0, lowercase__    ):
						__lowerCamelCase        =			i

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

			return totients





def 			a_   (  lowercase__   :int, lowercase__   :int    ):
			return sorted(str(lowercase__    )    ) == sorted(str(lowercase__    )    )





def 			a_   (  lowercase__   :int = 1000_0000    ):
			__lowerCamelCase        =			1  # i
			__lowerCamelCase        =			0  # φ(i)
			__lowerCamelCase        =			get_totients(max_n + 1    )

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

						if i * min_denominator < min_numerator * t and has_same_digits(lowercase__, lowercase__    ):
									__lowerCamelCase        =			i
									__lowerCamelCase        =			t

			return min_numerator


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








"""simple docstring"""




from __future__ import annotations

import re





def 			a_   (  lowercase__   :list[str]    ):

			def alphanum_key(lowercase__   :int    ):
						return [int(lowercase__    ) if s.isdigit() else s.lower() for s in re.split("""([0-9]+)""", lowercase__    )]

			return sorted(lowercase__, key=lowercase__    )


if __name__ == "__main__":
					import doctest

					doctest.testmod()




