



from __future__ import annotations

from collections import Counter







def  _UpperCAmelCase  (				SCREAMING_SNAKE_CASE__  ):


						'''simple docstring'''




						lowerCAmelCase	:   Dict					     =					[True] * n
						lowerCAmelCase	:   List[str]					     =					False
						lowerCAmelCase	:   Dict					     =					False
						lowerCAmelCase	:   Tuple					     =					True

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

						lowerCAmelCase	:   Any					     =					[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__  ):


						'''simple docstring'''




						lowerCAmelCase	:   List[Any]					     =					str(SCREAMING_SNAKE_CASE__  )
						lowerCAmelCase	:   Any					     =					[]
						lowerCAmelCase	:   Union[str, Any]					     =					["""0""", """1""", """2""", """3""", """4""", """5""", """6""", """7""", """8""", """9"""]

						for duplicate in Counter(SCREAMING_SNAKE_CASE__  ) - Counter(set(SCREAMING_SNAKE_CASE__  )  ):
												lowerCAmelCase	:   Tuple					     =					[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  ):


						'''simple docstring'''




						lowerCAmelCase	:   List[str]					     =					set()

						# Filter primes with less than 3 replaceable digits
						lowerCAmelCase	:   Optional[int]					     =					{
						    x for x in set(prime_sieve(1_0_0_0_0_0_0  )  ) if len(str(SCREAMING_SNAKE_CASE__  )  ) - len(set(str(SCREAMING_SNAKE_CASE__  )  )  ) >= 3
						}

						for prime in primes:
												if prime in numbers_checked:
																		continue

												lowerCAmelCase	:   List[Any]					     =					digit_replacements(SCREAMING_SNAKE_CASE__  )

												for family in replacements:
																		numbers_checked.update(SCREAMING_SNAKE_CASE__  )
																		lowerCAmelCase	:   List[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())






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


lowerCAmelCase					:				Optional[int]   	={
    'configuration_speech_to_text_2': ['SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP', 'Speech2Text2Config'],
    'processing_speech_to_text_2': ['Speech2Text2Processor'],
    'tokenization_speech_to_text_2': ['Speech2Text2Tokenizer'],
}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase					:				int   	=[
		    'SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'Speech2Text2ForCausalLM',
		    'Speech2Text2PreTrainedModel',
		]


if TYPE_CHECKING:
		from .configuration_speech_to_text_a import SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP, SpeechaTextaConfig
		from .processing_speech_to_text_a import SpeechaTextaProcessor
		from .tokenization_speech_to_text_a import SpeechaTextaTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_speech_to_text_a import (
				    SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST,
				    SpeechaTextaForCausalLM,
				    SpeechaTextaPreTrainedModel,
				)

else:
		import sys

		lowerCAmelCase					:				Union[str, Any]   	=_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

