





from __future__ import annotations

from collections import Counter




def 			lowerCAmelCase_			(				UpperCamelCase_	)  ->		list[int]:
       UpperCamelCase_ 							=	[True] * n
       UpperCamelCase_ 							=	False
       UpperCamelCase_ 							=	False
       UpperCamelCase_ 							=	True

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

       UpperCamelCase_ 							=	[2]

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

       return primes




def 			lowerCAmelCase_			(				UpperCamelCase_	)  ->		list[list[int]]:
       UpperCamelCase_ 							=	str(UpperCamelCase_	)
       UpperCamelCase_ 							=	[]
       UpperCamelCase_ 							=	["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]

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

       return replacements




def 			lowerCAmelCase_			(				UpperCamelCase_ = 8	)  ->		int:
       UpperCamelCase_ 							=	set()

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

       for prime in primes:
              if prime in numbers_checked:
                     continue

              UpperCamelCase_ 							=	digit_replacements(UpperCamelCase_	)

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

                     if len(UpperCamelCase_	) != family_length:
                            continue

                     return min(UpperCamelCase_	)

       return -1


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



def 		lowerCAmelCase_     (     _SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE  )   ->      Dict:

							"""simple docstring"""






							if power < 0:
														return -1
							base %= mod
							_UpperCAmelCase  :			Optional[Any]	       =		1

							while power > 0:
														if power & 1:
																					_UpperCAmelCase  :			Optional[Any]	       =		(result * base) % mod
														_UpperCAmelCase  :			List[str]	       =		power >> 1
														_UpperCAmelCase  :			Optional[int]	       =		(base * base) % mod

							return result




def 		lowerCAmelCase_     (     )   ->      List[str]:

							"""simple docstring"""






							print(modular_exponential(3      ,	2_0_0      ,	1_3  )  )


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				main()




