"""simple docstring"""







import argparse

from transformers import ConvBertConfig, ConvBertModel, TFConvBertModel, load_tf_weights_in_convbert
from transformers.utils import logging


logging.set_verbosity_info()


def 					a__ (						UpperCAmelCase__    :     Dict						,     UpperCAmelCase__    :     Tuple						,     UpperCAmelCase__    :     Union[str, Any]     ):
						UpperCAmelCase__   		=						ConvBertConfig.from_json_file(UpperCAmelCase__     )
						UpperCAmelCase__   		=						ConvBertModel(UpperCAmelCase__     )

						UpperCAmelCase__   		=						load_tf_weights_in_convbert(UpperCAmelCase__						,     UpperCAmelCase__						,     UpperCAmelCase__     )
						model.save_pretrained(UpperCAmelCase__     )

						UpperCAmelCase__   		=						TFConvBertModel.from_pretrained(UpperCAmelCase__						,     from_pt=UpperCAmelCase__     )
						tf_model.save_pretrained(UpperCAmelCase__     )


if __name__ == "__main__":
						UpperCamelCase_    :    Any											=						argparse.ArgumentParser()
						# Required parameters
						parser.add_argument(
						    """--tf_checkpoint_path""", default=None, type=str, required=True, help="""Path to the TensorFlow checkpoint path."""
						)
						parser.add_argument(
						    """--convbert_config_file""",
						    default=None,
						    type=str,
						    required=True,
						    help=(
						        """The config json file corresponding to the pre-trained ConvBERT model. \n"""
						        """This specifies the model architecture."""
						    ),
						)
						parser.add_argument(
						    """--pytorch_dump_path""", default=None, type=str, required=True, help="""Path to the output PyTorch model."""
						)
						UpperCamelCase_    :    Optional[Any]											=						parser.parse_args()
						convert_orig_tfa_checkpoint_to_pytorch(args.tf_checkpoint_path, args.convbert_config_file, args.pytorch_dump_path)


"""simple docstring"""







from __future__ import annotations

from collections import Counter


def 					a__ (						UpperCAmelCase__    :     int     )->		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 					a__ (						UpperCAmelCase__    :     int     )->		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 					a__ (						UpperCAmelCase__    :     int = 8     )->		int:
						UpperCAmelCase__   		=						set()

						# Filter primes with less than 3 replaceable digits
						UpperCAmelCase__   		=						{
						    x for x in set(prime_sieve(1_0_0_0_0_0_0     )     ) 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())

