

from __future__ import annotations

from collections import Counter






def        lowerCamelCase_  (				UpperCAmelCase_				:  int						)    ->					list[int]:




	'''simple docstring'''




	_UpperCamelCase :		str								=    [True] * n
	_UpperCamelCase :		Union[str, Any]								=    False
	_UpperCamelCase :		List[Any]								=    False
	_UpperCamelCase :		List[str]								=    True

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

	_UpperCamelCase :		Union[str, Any]								=    [2]

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

	return primes






def        lowerCamelCase_  (				UpperCAmelCase_				:  int						)    ->					list[list[int]]:




	'''simple docstring'''




	_UpperCamelCase :		Any								=    str(snake_case_						)
	_UpperCamelCase :		List[str]								=    []
	_UpperCamelCase :		int								=    ['''0''', '''1''', '''2''', '''3''', '''4''', '''5''', '''6''', '''7''', '''8''', '''9''']

	for duplicate in Counter(snake_case_						) - Counter(set(snake_case_						)						):
		_UpperCamelCase :		Union[str, Any]								=    [int(number_str.replace(snake_case_				,							snake_case_						)						) for digit in digits]
		replacements.append(snake_case_						)

	return replacements






def        lowerCamelCase_  (				UpperCAmelCase_				:  int = 8						)    ->					int:




	'''simple docstring'''




	_UpperCamelCase :		List[Any]								=    set()

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

	for prime in primes:
		if prime in numbers_checked:
			continue

		_UpperCamelCase :		Any								=    digit_replacements(snake_case_						)

		for family in replacements:
			numbers_checked.update(snake_case_						)
			_UpperCamelCase :		Optional[Any]								=    primes.intersection(snake_case_						)

			if len(snake_case_						) != family_length:
				continue

			return min(snake_case_						)

	return -1


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









'''simple docstring'''






import abc
import copy
import dataclasses
from dataclasses import dataclass
from typing import ClassVar, Dict, Type, TypeVar

from ..features import Features


lowerCamelCase__	  =		TypeVar('T', bound='TaskTemplate')

@dataclass(frozen=__A       )
class 	_lowerCAmelCase     (    abc.ABC       ):






		'''simple docstring'''
		# `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
		snake_case_							= 42
		snake_case_							= 42
		snake_case_							= 42
		def 						__lowercase      (						self							:       T      ,		UpperCamelCase_							:       Features		)      ->			T:







									'''simple docstring'''





									return copy.deepcopy(self		)
		@property
		def 						__lowercase      (						self							:       int		)      ->			Features:







									'''simple docstring'''





									return Features(**self.input_schema      ,		**self.label_schema		)
		@property
		@abc.abstractmethod
		def 						__lowercase      (						self							:       List[str]		)      ->			Dict[str, str]:







									'''simple docstring'''





									raise NotImplementedError





		@classmethod
		def 						__lowercase      (						cls							:       Type[T]      ,		UpperCamelCase_							:       dict		)      ->			T:







									'''simple docstring'''





									_lowercase							:		List[str]				=   {f.name for f in dataclasses.fields(cls		)}
									return cls(**{k: v for k, v in template_dict.items() if k in field_names}		)



