






"""simple docstring"""





import sys

sys.set_int_max_str_digits(0)  # type: ignore







def 					lowerCamelCase__	(							_lowerCamelCase	:		int			)				->    bool:
		lowerCamelCase_   					=						[0] * 11
		lowerCamelCase_   					=						[0] * 11

		# mark last 9 numbers
		for _ in range(9			):
				lowerCamelCase_   					=						1
				lowerCamelCase_   					=						number // 10
		# flag
		lowerCamelCase_   					=						True

		# check last 9 numbers for pandigitality

		for x in range(9			):
				if not check_last[x + 1]:
						lowerCamelCase_   					=						False
		if not f:
				return f

		# mark first 9 numbers
		lowerCamelCase_   					=						int(str(_lowerCamelCase			)[:9]			)

		for _ in range(9			):
				lowerCamelCase_   					=						1
				lowerCamelCase_   					=						number // 10

		# check first 9 numbers for pandigitality

		for x in range(9			):
				if not check_front[x + 1]:
						lowerCamelCase_   					=						False
		return f







def 					lowerCamelCase__	(							_lowerCamelCase	:		int			)				->    bool:
		lowerCamelCase_   					=						[0] * 11

		# mark last 9 numbers
		for _ in range(9			):
				lowerCamelCase_   					=						1
				lowerCamelCase_   					=						number // 10
		# flag
		lowerCamelCase_   					=						True

		# check last 9 numbers for pandigitality

		for x in range(9			):
				if not check_last[x + 1]:
						lowerCamelCase_   					=						False
		return f







def 					lowerCamelCase__	(							)				->    int:
		lowerCamelCase_   					=						1
		lowerCamelCase_   					=						1
		lowerCamelCase_   					=						2
		# temporary Fibonacci numbers

		lowerCamelCase_   					=						1
		lowerCamelCase_   					=						1
		lowerCamelCase_   					=						2
		# temporary Fibonacci numbers mod 1e9

		# mod m=1e9, done for fast optimisation
		lowerCamelCase_   					=						[0] * 1000000
		lowerCamelCase_   					=						1000000000

		for x in range(1000000			):
				lowerCamelCase_   					=						(aa + ba) % m
				lowerCamelCase_   					=						ba % m
				lowerCamelCase_   					=						ca % m
				if checka(_lowerCamelCase			):
						lowerCamelCase_   					=						1

		for x in range(1000000			):
				lowerCamelCase_   					=						a + b
				lowerCamelCase_   					=						b
				lowerCamelCase_   					=						c
				# perform check only if in tocheck
				if tocheck[x + 3] and check(_lowerCamelCase			):
						return x + 3  # first 2 already done
		return -1


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












"""simple docstring"""





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_SCREAMING_SNAKE_CASE :    Union[str, Any]    =						{
    '''configuration_decision_transformer''': [
        '''DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''DecisionTransformerConfig''',
    ],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _SCREAMING_SNAKE_CASE :    Optional[Any]    =						[
      '''DECISION_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''DecisionTransformerGPT2Model''',
      '''DecisionTransformerGPT2PreTrainedModel''',
      '''DecisionTransformerModel''',
      '''DecisionTransformerPreTrainedModel''',
  ]


if TYPE_CHECKING:
  from .configuration_decision_transformer import (
      DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      DecisionTransformerConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_decision_transformer import (
        DECISION_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        DecisionTransformerGPTaModel,
        DecisionTransformerGPTaPreTrainedModel,
        DecisionTransformerModel,
        DecisionTransformerPreTrainedModel,
    )


else:
  import sys

  _SCREAMING_SNAKE_CASE :    List[str]    =						_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




