

from __future__ import annotations

from collections import Counter




def      UpperCAmelCase__							(     _A :					int				):





  '''simple docstring'''







  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      , _snake_case      , 2				):
    if is_prime[i]:
      primes.append(_snake_case				)

  return primes




def      UpperCAmelCase__							(     _A :					int				):





  '''simple docstring'''







  a__    =str(_snake_case				)
  a__    =[]
  a__    =['''0''', '''1''', '''2''', '''3''', '''4''', '''5''', '''6''', '''7''', '''8''', '''9''']

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

  return replacements




def      UpperCAmelCase__							(     _A :					int = 8				):





  '''simple docstring'''







  a__    =set()

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

  for prime in primes:
    if prime in numbers_checked:
      continue

    a__    =digit_replacements(_snake_case				)

    for family in replacements:
      numbers_checked.update(_snake_case				)
      a__    =primes.intersection(_snake_case				)

      if len(_snake_case				) != family_length:
        continue

      return min(_snake_case				)

  return -1


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




"""simple docstring"""





from doctest import testmod
from math import sqrt


def   _snake_case    (    _snake_case					:      int      ):
      lowerCAmelCase       :						list[int]							= []
      if num < 1:
            return facs
      facs.append(1      )
      if num == 1:
            return facs
      facs.append(_snake_case      )
      for i in range(2			, int(sqrt(_snake_case      )      ) + 1      ):
            if num % i == 0:  # If i is a factor of num
                  facs.append(_snake_case      )
                  lowerCAmelCase       :						Dict							= num // i  # num//i is the other factor of num
                  if d != i:  # If d and i are distinct
                        facs.append(_snake_case      )  # we have found another factor
      facs.sort()
      return facs


if __name__ == "__main__":
 testmod(name='''factors_of_a_number''', verbose=True)


