





"""simple docstring"""
from __future__ import annotations

from collections import Counter




def 			__snake_case						(      __A    )		->				list[int]:
   lowercase    :			Any  =       [True] * n
   lowercase    :			Tuple  =       False
   lowercase    :			List[Any]  =       False
   lowercase    :			int  =       True

   for i in range(3 ,int(n**0.5 + 1    ) ,2    ):
      lowercase    :			List[str]  =       i * 2
      while index < n:
         lowercase    :			Optional[int]  =       False
         lowercase    :			List[str]  =       index + i

   lowercase    :			Dict  =       [2]

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

   return primes




def 			__snake_case						(      __A    )		->				list[list[int]]:
   lowercase    :			Dict  =       str(__A    )
   lowercase    :			Union[str, Any]  =       []
   lowercase    :			str  =       ["""0""", """1""", """2""", """3""", """4""", """5""", """6""", """7""", """8""", """9"""]

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

   return replacements




def 			__snake_case						(      __A = 8    )		->				int:
   lowercase    :			Any  =       set()

   # Filter primes with less than 3 replaceable digits
   lowercase    :			Optional[Any]  =       {
       x for x in set(prime_sieve(1000000    )    ) if len(str(__A    )    ) - len(set(str(__A    )    )    ) >= 3
   }

   for prime in primes:
      if prime in numbers_checked:
         continue

      lowercase    :			Any  =       digit_replacements(__A    )

      for family in replacements:
         numbers_checked.update(__A    )
         lowercase    :			str  =       primes.intersection(__A    )

         if len(__A    ) != family_length:
            continue

         return min(__A    )

   return -1


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









"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowerCAmelCase:	Union[str, Any]							      ={
    "configuration_deberta_v2": ["DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP", "DebertaV2Config", "DebertaV2OnnxConfig"],
    "tokenization_deberta_v2": ["DebertaV2Tokenizer"],
}

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCAmelCase:	Dict							      =["DebertaV2TokenizerFast"]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCAmelCase:	Optional[Any]							      =[
       "TF_DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST",
       "TFDebertaV2ForMaskedLM",
       "TFDebertaV2ForQuestionAnswering",
       "TFDebertaV2ForSequenceClassification",
       "TFDebertaV2ForTokenClassification",
       "TFDebertaV2Model",
       "TFDebertaV2PreTrainedModel",
   ]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCAmelCase:	str							      =[
       "DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST",
       "DebertaV2ForMaskedLM",
       "DebertaV2ForMultipleChoice",
       "DebertaV2ForQuestionAnswering",
       "DebertaV2ForSequenceClassification",
       "DebertaV2ForTokenClassification",
       "DebertaV2Model",
       "DebertaV2PreTrainedModel",
   ]


if TYPE_CHECKING:
   from .configuration_deberta_va import (
       DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP,
       DebertaVaConfig,
       DebertaVaOnnxConfig,
   )
   from .tokenization_deberta_va import DebertaVaTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_deberta_va_fast import DebertaVaTokenizerFast

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_deberta_va import (
          TF_DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFDebertaVaForMaskedLM,
          TFDebertaVaForQuestionAnswering,
          TFDebertaVaForSequenceClassification,
          TFDebertaVaForTokenClassification,
          TFDebertaVaModel,
          TFDebertaVaPreTrainedModel,
      )

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_deberta_va import (
          DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST,
          DebertaVaForMaskedLM,
          DebertaVaForMultipleChoice,
          DebertaVaForQuestionAnswering,
          DebertaVaForSequenceClassification,
          DebertaVaForTokenClassification,
          DebertaVaModel,
          DebertaVaPreTrainedModel,
      )

else:
   import sys

   lowerCAmelCase:	Optional[Any]							      =_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


