


import sys

sys.set_int_max_str_digits(0)  # type: ignore






def 	lowerCamelCase_       (			_a			):




		"""simple docstring"""






		lowerCAmelCase__  :     int       	=   [0] * 11
		lowerCAmelCase__  :     List[Any]       	=   [0] * 11

		# mark last 9 numbers
		for _ in range(9			):
				lowerCAmelCase__  :     Optional[Any]       	=   1
				lowerCAmelCase__  :     int       	=   number // 10
		# flag
		lowerCAmelCase__  :     Any       	=   True

		# check last 9 numbers for pandigitality

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

		# mark first 9 numbers
		lowerCAmelCase__  :     Union[str, Any]       	=   int(str(_a			)[:9]			)

		for _ in range(9			):
				lowerCAmelCase__  :     Optional[Any]       	=   1
				lowerCAmelCase__  :     Tuple       	=   number // 10

		# check first 9 numbers for pandigitality

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






def 	lowerCamelCase_       (			_a			):




		"""simple docstring"""






		lowerCAmelCase__  :     Optional[Any]       	=   [0] * 11

		# mark last 9 numbers
		for _ in range(9			):
				lowerCAmelCase__  :     Tuple       	=   1
				lowerCAmelCase__  :     List[Any]       	=   number // 10
		# flag
		lowerCAmelCase__  :     Union[str, Any]       	=   True

		# check last 9 numbers for pandigitality

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






def 	lowerCamelCase_       (			):




		"""simple docstring"""






		lowerCAmelCase__  :     str       	=   1
		lowerCAmelCase__  :     Union[str, Any]       	=   1
		lowerCAmelCase__  :     Any       	=   2
		# temporary Fibonacci numbers

		lowerCAmelCase__  :     Union[str, Any]       	=   1
		lowerCAmelCase__  :     Optional[Any]       	=   1
		lowerCAmelCase__  :     Any       	=   2
		# temporary Fibonacci numbers mod 1e9

		# mod m=1e9, done for fast optimisation
		lowerCAmelCase__  :     Optional[int]       	=   [0] * 1_000_000
		lowerCAmelCase__  :     Optional[int]       	=   1_000_000_000

		for x in range(1_000_000			):
				lowerCAmelCase__  :     str       	=   (aa + ba) % m
				lowerCAmelCase__  :     int       	=   ba % m
				lowerCAmelCase__  :     Optional[Any]       	=   ca % m
				if checka(_a			):
						lowerCAmelCase__  :     Optional[Any]       	=   1

		for x in range(1_000_000			):
				lowerCAmelCase__  :     Dict       	=   a + b
				lowerCAmelCase__  :     Union[str, Any]       	=   b
				lowerCAmelCase__  :     List[str]       	=   c
				# perform check only if in tocheck
				if tocheck[x + 3] and check(_a			):
						return x + 3  # first 2 already done
		return -1


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








from __future__ import annotations

from string import ascii_letters






def 	lowerCamelCase_       (			_a      ,  _a      ,  _a = None			):




		"""simple docstring"""






		lowerCAmelCase__  :     List[Any]       	=   alphabet or ascii_letters

		# The final result string
		lowerCAmelCase__  :     Optional[Any]       	=   ''''''

		for character in input_string:
				if character not in alpha:
						# Append without encryption if character is not in the alphabet
						result += character
				else:
						# Get the index of the new key and make sure it isn't too large
						lowerCAmelCase__  :     int       	=   (alpha.index(_a			) + key) % len(_a			)

						# Append the encoded character to the alphabet
						result += alpha[new_key]

		return result






def 	lowerCamelCase_       (			_a      ,  _a      ,  _a = None			):




		"""simple docstring"""






		key *= -1

		return encrypt(_a      ,  _a      ,  _a			)






def 	lowerCamelCase_       (			_a      ,  _a = None			):




		"""simple docstring"""






		lowerCAmelCase__  :     Optional[Any]       	=   alphabet or ascii_letters

		# To store data on all the combinations
		lowerCAmelCase__  :     Optional[int]       	=   {}

		# Cycle through each combination
		for key in range(1      ,  len(_a			) + 1			):
				# Decrypt the message and store the result in the data
				lowerCAmelCase__  :     Optional[int]       	=   decrypt(_a      ,  _a      ,  _a			)

		return brute_force_data


if __name__ == "__main__":
		while True:
				print(f'''\n{"-" * 10}\n Menu\n{"-" * 10}''')
				print(*['''1.Encrypt''', '''2.Decrypt''', '''3.BruteForce''', '''4.Quit'''], sep='''\n''')

				# get user input
				lowerCamelCase		=						input('''\nWhat would you like to do?: ''').strip() or '''4'''

				# run functions based on what the user chose
				if choice not in ("1", "2", "3", "4"):
						print('''Invalid choice, please enter a valid choice''')
				elif choice == "1":
						lowerCamelCase		=						input('''Please enter the string to be encrypted: ''')
						lowerCamelCase		=						int(input('''Please enter off-set: ''').strip())

						print(encrypt(input_string, key))
				elif choice == "2":
						lowerCamelCase		=						input('''Please enter the string to be decrypted: ''')
						lowerCamelCase		=						int(input('''Please enter off-set: ''').strip())

						print(decrypt(input_string, key))
				elif choice == "3":
						lowerCamelCase		=						input('''Please enter the string to be decrypted: ''')
						lowerCamelCase		=						brute_force(input_string)

						for key, value in brute_force_data.items():
								print(f'''Key: {key} | Message: {value}''')

				elif choice == "4":
						print('''Goodbye.''')
						break




