'''simple docstring'''

from __future__ import annotations







def 					UpperCamelCase_						( snake_case_	:	Optional[int]				) ->					str:






 '''simple docstring'''

 __lowerCAmelCase    							=						[0] * max_one

 for i in range(0						,		snake_case_				):
  __lowerCAmelCase    							=						i

 for i in range(2						,		snake_case_				):
  if totients[i] == i:
   for j in range(snake_case_						,		snake_case_						,		snake_case_				):
    totients[j] -= totients[j] // i

 return totients







def 					UpperCamelCase_						( snake_case_	:	Any						,		snake_case_	:	int				) ->					Union[str, Any]:






 '''simple docstring'''

 return sorted(str(snake_case_				)				) == sorted(str(snake_case_				)				)







def 					UpperCamelCase_						( snake_case_	:	Any = 10_00_00_00				) ->					List[Any]:






 '''simple docstring'''

 __lowerCAmelCase    							=						1  # i
 __lowerCAmelCase    							=						0  # φ(i)
 __lowerCAmelCase    							=						get_totients(max_n + 1				)

 for i in range(2						,		max_n + 1				):
  __lowerCAmelCase    							=						totients[i]

  if i * min_denominator < min_numerator * t and has_same_digits(snake_case_						,		snake_case_				):
   __lowerCAmelCase    							=						i
   __lowerCAmelCase    							=						t

 return min_numerator


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







'''simple docstring'''

from typing import TYPE_CHECKING

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


_A      :				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:
 _A      :				Any 				=    [
     '''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

 _A      :				Tuple 				=    _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






