





"""simple docstring"""


def     UpperCamelCase       (SCREAMING_SNAKE_CASE    ):
						if not isinstance(SCREAMING_SNAKE_CASE       ,    SCREAMING_SNAKE_CASE    ):
												raise TypeError("""recursive_lucas_number accepts only integer arguments."""    )
						if n_th_number == 0:
												return 2
						if n_th_number == 1:
												return 1

						return recursive_lucas_number(n_th_number - 1    ) + recursive_lucas_number(
						    n_th_number - 2    )

def     UpperCamelCase       (SCREAMING_SNAKE_CASE    ):
						if not isinstance(SCREAMING_SNAKE_CASE       ,    SCREAMING_SNAKE_CASE    ):
												raise TypeError("""dynamic_lucas_number accepts only integer arguments."""    )
						UpperCamelCase      ,	UpperCamelCase							:		Tuple							      = 2, 1
						for _ in range(SCREAMING_SNAKE_CASE    ):
												UpperCamelCase      ,	UpperCamelCase							:		Any							      = b, a + b
						return a


if __name__ == "__main__":
		from doctest import testmod

		testmod()
		__magic_name__					:				Union[str, Any]	= int(input("""Enter the number of terms in lucas series:\n""").strip())
		print("""Using recursive function to calculate lucas series:""")
		print(""" """.join(str(recursive_lucas_number(i)) for i in range(n)))
		print("""\nUsing dynamic function to calculate lucas series:""")
		print(""" """.join(str(dynamic_lucas_number(i)) for i in range(n)))










"""simple docstring"""


from __future__ import annotations

def     UpperCamelCase       (SCREAMING_SNAKE_CASE    ):
						UpperCamelCase							:		Tuple							      = [0] * max_one

						for i in range(0       ,    SCREAMING_SNAKE_CASE    ):
												UpperCamelCase							:		Union[str, Any]							      = i

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

						return totients

def     UpperCamelCase       (SCREAMING_SNAKE_CASE       ,    SCREAMING_SNAKE_CASE    ):
						return sorted(str(SCREAMING_SNAKE_CASE    )    ) == sorted(str(SCREAMING_SNAKE_CASE    )    )

def     UpperCamelCase       (SCREAMING_SNAKE_CASE = 1000_0000    ):
						UpperCamelCase							:		List[str]							      = 1  # i
						UpperCamelCase							:		Optional[int]							      = 0  # φ(i)
						UpperCamelCase							:		List[str]							      = get_totients(max_n + 1    )

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

												if i * min_denominator < min_numerator * t and has_same_digits(SCREAMING_SNAKE_CASE       ,    SCREAMING_SNAKE_CASE    ):
																		UpperCamelCase							:		str							      = i
																		UpperCamelCase							:		Tuple							      = t

						return min_numerator


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



