



from __future__ import annotations

from collections import Counter




def 			UpperCAmelCase__       (							__snake_case							)      ->       List[str]:
  _A							=			[True] * n
  _A							=			False
  _A							=			False
  _A							=			True

  for i in range(3  , int(n**0.5 + 1							)  , 2							):
    _A							=			i * 2
    while index < n:
      _A							=			False
      _A							=			index + i

  _A							=			[2]

  for i in range(3  , __lowerCamelCase  , 2							):
    if is_prime[i]:
      primes.append(__lowerCamelCase							)

  return primes




def 			UpperCAmelCase__       (							__snake_case							)      ->       Dict:
  _A							=			str(__lowerCamelCase							)
  _A							=			[]
  _A							=			['''0''', '''1''', '''2''', '''3''', '''4''', '''5''', '''6''', '''7''', '''8''', '''9''']

  for duplicate in Counter(__lowerCamelCase							) - Counter(set(__lowerCamelCase							)							):
    _A							=			[int(number_str.replace(__lowerCamelCase  , __lowerCamelCase							)							) for digit in digits]
    replacements.append(__lowerCamelCase							)

  return replacements




def 			UpperCAmelCase__       (							__snake_case = 8							)      ->       int:
  _A							=			set()

  # Filter primes with less than 3 replaceable digits
  _A							=			{
      x for x in set(prime_sieve(1_000_000							)							) if len(str(__lowerCamelCase							)							) - len(set(str(__lowerCamelCase							)							)							) >= 3
  }

  for prime in primes:
    if prime in numbers_checked:
      continue

    _A							=			digit_replacements(__lowerCamelCase							)

    for family in replacements:
      numbers_checked.update(__lowerCamelCase							)
      _A							=			primes.intersection(__lowerCamelCase							)

      if len(__lowerCamelCase							) != family_length:
        continue

      return min(__lowerCamelCase							)

  return -1


if __name__ == "__main__":
    print(solution())
def 							lowerCAmelCase(	__lowerCamelCase = 10**6						):

					if n <= 0:
										raise ValueError('Please enter an integer greater than 0'						)

					__a							=   list(range(n + 1						)						)
					for number in range(2      ,				n + 1						):
										if phi[number] == number:
															phi[number] -= 1
															for multiple in range(number * 2      ,				n + 1      ,				__lowerCamelCase						):
																				__a							=   (phi[multiple] // number) * (number - 1)

					__a							=   1
					for number in range(1      ,				n + 1						):
										if (answer / phi[answer]) < (number / phi[number]):
															__a							=   number

					return answer


if __name__ == "__main__":
	print(solution())




