



# this script builds a small sample spm file tests/fixtures/test_sentencepiece_no_bos.model, with features needed by pegasus

# 1. pip install sentencepiece
#
# 2. wget https://raw.githubusercontent.com/google/sentencepiece/master/data/botchan.txt

# 3. build
import sentencepiece as spm

# pegasus:
# 1. no bos
# 2. eos_id is 1
# 3. unk_id is 2
# build a sample spm file accordingly
spm.SentencePieceTrainer.train(
    "--input=botchan.txt --model_prefix=test_sentencepiece_no_bos --bos_id=-1 --unk_id=2  --eos_id=1  --vocab_size=1000"
)

# 4. now update the fixture
# mv test_sentencepiece_no_bos.model ../../tests/fixtures/





import sys

sys.set_int_max_str_digits(0)  # type: ignore





def 				A      (	_UpperCAmelCase							:  int       )							->					bool:







			'''simple docstring'''
			_UpperCAmelCase									=  [0] * 11
			_UpperCAmelCase									=  [0] * 11

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

			# check last 9 numbers for pandigitality

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

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

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

			# check first 9 numbers for pandigitality

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





def 				A      (	_UpperCAmelCase							:  int       )							->					bool:







			'''simple docstring'''
			_UpperCAmelCase									=  [0] * 11

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

			# check last 9 numbers for pandigitality

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





def 				A      (	)							->					int:







			'''simple docstring'''
			_UpperCAmelCase									=  1
			_UpperCAmelCase									=  1
			_UpperCAmelCase									=  2
			# temporary Fibonacci numbers

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

			# mod m=1e9, done for fast optimisation
			_UpperCAmelCase									=  [0] * 1_000_000
			_UpperCAmelCase									=  1_000_000_000

			for x in range(1_000_000       ):
						_UpperCAmelCase									=  (aa + ba) % m
						_UpperCAmelCase									=  ba % m
						_UpperCAmelCase									=  ca % m
						if checka(_UpperCAmelCase       ):
									_UpperCAmelCase									=  1

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


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