




'''simple docstring'''






from __future__ import annotations

from collections import Counter






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE		)						->      list[int]:
      snake_case__					:      List[str]  			=						[True] * n
      snake_case__					:      Union[str, Any]  			=						False
      snake_case__					:      List[Any]  			=						False
      snake_case__					:      Union[str, Any]  			=						True

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

      snake_case__					:      List[str]  			=						[2]

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

      return primes






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE		)						->      list[list[int]]:
      snake_case__					:      Any  			=						str(__SCREAMING_SNAKE_CASE		)
      snake_case__					:      Tuple  			=						[]
      snake_case__					:      List[Any]  			=						['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']

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

      return replacements






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE = 8		)						->      int:
      snake_case__					:      Union[str, Any]  			=						set()

      # Filter primes with less than 3 replaceable digits
      snake_case__					:      List[Any]  			=						{
          x for x in set(prime_sieve(100_0000		)		) if len(str(__SCREAMING_SNAKE_CASE		)		) - len(set(str(__SCREAMING_SNAKE_CASE		)		)		) >= 3
      }

      for prime in primes:
            if prime in numbers_checked:
                  continue

            snake_case__					:      Optional[Any]  			=						digit_replacements(__SCREAMING_SNAKE_CASE		)

            for family in replacements:
                  numbers_checked.update(__SCREAMING_SNAKE_CASE		)
                  snake_case__					:      Any  			=						primes.intersection(__SCREAMING_SNAKE_CASE		)

                  if len(__SCREAMING_SNAKE_CASE		) != family_length:
                        continue

                  return min(__SCREAMING_SNAKE_CASE		)

      return -1


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






'''simple docstring'''






from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available


A_ 			=		{
    "configuration_ernie_m": ["ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP", "ErnieMConfig"],
}

try:
      if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A_ 			=		["ErnieMTokenizer"]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A_ 			=		[
          "ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST",
          "ErnieMForMultipleChoice",
          "ErnieMForQuestionAnswering",
          "ErnieMForSequenceClassification",
          "ErnieMForTokenClassification",
          "ErnieMModel",
          "ErnieMPreTrainedModel",
          "ErnieMForInformationExtraction",
      ]


if TYPE_CHECKING:
      from .configuration_ernie_m import ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP, ErnieMConfig

      try:
            if not is_sentencepiece_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_ernie_m import ErnieMTokenizer

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_ernie_m import (
                ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST,
                ErnieMForInformationExtraction,
                ErnieMForMultipleChoice,
                ErnieMForQuestionAnswering,
                ErnieMForSequenceClassification,
                ErnieMForTokenClassification,
                ErnieMModel,
                ErnieMPreTrainedModel,
            )


else:
      import sys

      A_ 			=		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
