

'''simple docstring'''





import sys

sys.set_int_max_str_digits(0)  # type: ignore






def  UpperCamelCase_(							_snake_case     :						int			):




			"""simple docstring"""






			__a						   =[0] * 11
			__a						   =[0] * 11

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

			# check last 9 numbers for pandigitality

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

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

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

			# check first 9 numbers for pandigitality

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






def  UpperCamelCase_(							_snake_case     :						int			):




			"""simple docstring"""






			__a						   =[0] * 11

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

			# check last 9 numbers for pandigitality

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






def  UpperCamelCase_(							):




			"""simple docstring"""






			__a						   =1
			__a						   =1
			__a						   =2
			# temporary Fibonacci numbers

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

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

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

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


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









import os
import sys
import time

from . import transposition_cipher as trans_cipher






def  UpperCamelCase_(							):




			"""simple docstring"""






			__a						   ='Prehistoric Men.txt'
			__a						   ='Output.txt'
			__a						   =int(input('Enter key: '			)			)
			__a						   =input('Encrypt/Decrypt [e/d]: '			)

			if not os.path.exists(_snake_case			):
						print(F'File {input_file} does not exist. Quitting...'			)
						sys.exit()
			if os.path.exists(_snake_case			):
						print(F'Overwrite {output_file}? [y/n]'			)
						__a						   =input('> '			)
						if not response.lower().startswith('y'			):
									sys.exit()

			__a						   =time.time()
			if mode.lower().startswith('e'			):
						with open(_snake_case			) as f:
									__a						   =f.read()
						__a						   =trans_cipher.encrypt_message(_snake_case ,  _snake_case			)
			elif mode.lower().startswith('d'			):
						with open(_snake_case			) as f:
									__a						   =f.read()
						__a						   =trans_cipher.decrypt_message(_snake_case ,  _snake_case			)

			with open(_snake_case ,  'w'			) as output_obj:
						output_obj.write(_snake_case			)

			__a						   =round(time.time() - start_time ,  2			)
			print(('Done (', total_time, 'seconds )')			)


if __name__ == "__main__":
						main()






