



'''simple docstring'''


from __future__ import annotations






def  UpperCAmelCase_       (		lowercase__       ):


     '''simple docstring'''







     a_       		=str(lowercase__       )
     return len(lowercase__       ) == 9 and set(lowercase__       ) == set("123456789"       )






def  UpperCAmelCase_       (		):


     '''simple docstring'''







     for base_num in range(9_9_9_9       ,	4_9_9_9       ,	-1       ):
          a_       		=1_0_0_0_0_2 * base_num
          if is_9_pandigital(lowercase__       ):
               return candidate

     for base_num in range(3_3_3       ,	9_9       ,	-1       ):
          a_       		=1_0_0_2_0_0_3 * base_num
          if is_9_pandigital(lowercase__       ):
               return candidate

     return None


if __name__ == "__main__":
  print(F"""{solution() = }""")







'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


lowercase							       =			{
    '''configuration_rag''': ['''RagConfig'''],
    '''retrieval_rag''': ['''RagRetriever'''],
    '''tokenization_rag''': ['''RagTokenizer'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			[
      '''RagModel''',
      '''RagPreTrainedModel''',
      '''RagSequenceForGeneration''',
      '''RagTokenForGeneration''',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			[
      '''TFRagModel''',
      '''TFRagPreTrainedModel''',
      '''TFRagSequenceForGeneration''',
      '''TFRagTokenForGeneration''',
  ]


if TYPE_CHECKING:
  from .configuration_rag import RagConfig
  from .retrieval_rag import RagRetriever
  from .tokenization_rag import RagTokenizer

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_rag import RagModel, RagPreTrainedModel, RagSequenceForGeneration, RagTokenForGeneration

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_rag import (
        TFRagModel,
        TFRagPreTrainedModel,
        TFRagSequenceForGeneration,
        TFRagTokenForGeneration,
    )

else:
  import sys

  lowercase							       =			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


