


'''simple docstring'''


def       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				if not isinstance(SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):
								raise TypeError("""plaintext must be a string"""					)
				if not isinstance(SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):
								raise TypeError("""key must be a string"""					)

				if not plaintext:
								raise ValueError("""plaintext is empty"""					)
				if not key:
								raise ValueError("""key is empty"""					)

				key += plaintext
				_SCREAMING_SNAKE_CASE			:	List[Any]							=				plaintext.lower()
				_SCREAMING_SNAKE_CASE			:	Any							=				key.lower()
				_SCREAMING_SNAKE_CASE			:	str							=				0
				_SCREAMING_SNAKE_CASE			:	List[Any]							=				0
				_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				""""""
				while plaintext_iterator < len(SCREAMING_SNAKE_CASE__					):
								if (
								    ord(plaintext[plaintext_iterator]					) < 97
								    or ord(plaintext[plaintext_iterator]					) > 122
								):
												ciphertext += plaintext[plaintext_iterator]
												plaintext_iterator += 1
								elif ord(key[key_iterator]					) < 97 or ord(key[key_iterator]					) > 122:
												key_iterator += 1
								else:
												ciphertext += chr(
												    (
												        (ord(plaintext[plaintext_iterator]					) - 97 + ord(key[key_iterator]					))
												        - 97
												    )
												    % 26
												    + 97					)
												key_iterator += 1
												plaintext_iterator += 1
				return ciphertext







def       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				if not isinstance(SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):
								raise TypeError("""ciphertext must be a string"""					)
				if not isinstance(SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):
								raise TypeError("""key must be a string"""					)

				if not ciphertext:
								raise ValueError("""ciphertext is empty"""					)
				if not key:
								raise ValueError("""key is empty"""					)

				_SCREAMING_SNAKE_CASE			:	Tuple							=				key.lower()
				_SCREAMING_SNAKE_CASE			:	List[str]							=				0
				_SCREAMING_SNAKE_CASE			:	List[str]							=				0
				_SCREAMING_SNAKE_CASE			:	Any							=				""""""
				while ciphertext_iterator < len(SCREAMING_SNAKE_CASE__					):
								if (
								    ord(ciphertext[ciphertext_iterator]					) < 97
								    or ord(ciphertext[ciphertext_iterator]					) > 122
								):
												plaintext += ciphertext[ciphertext_iterator]
								else:
												plaintext += chr(
												    (ord(ciphertext[ciphertext_iterator]					) - ord(key[key_iterator]					)) % 26
												    + 97					)
												key += chr(
												    (ord(ciphertext[ciphertext_iterator]					) - ord(key[key_iterator]					)) % 26
												    + 97					)
												key_iterator += 1
								ciphertext_iterator += 1
				return plaintext


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				UpperCAmelCase_		:       Dict							       =		int(input('Type 1 to encrypt or 2 to decrypt:'))
				if operation == 1:
								UpperCAmelCase_		:       Any							       =		input('Typeplaintext to be encrypted:\n')
								UpperCAmelCase_		:       Optional[Any]							       =		input('Type the key:\n')
								print(encrypt(plaintext, key))
				elif operation == 2:
								UpperCAmelCase_		:       List[Any]							       =		input('Type the ciphertext to be decrypted:\n')
								UpperCAmelCase_		:       Dict							       =		input('Type the key:\n')
								print(decrypt(ciphertext, key))
				decrypt('jsqqs avvwo', 'coffee')








'''simple docstring'''


def       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				if len(str(SCREAMING_SNAKE_CASE__					)					) == 1 or len(str(SCREAMING_SNAKE_CASE__					)					) == 1:
								return a * b

				_SCREAMING_SNAKE_CASE			:	Optional[Any]							=				max(len(str(SCREAMING_SNAKE_CASE__					)					)							,				len(str(SCREAMING_SNAKE_CASE__					)					)					)
				_SCREAMING_SNAKE_CASE			:	Tuple							=				ma // 2

				_SCREAMING_SNAKE_CASE		,	_SCREAMING_SNAKE_CASE			:	Optional[int]							=				divmod(SCREAMING_SNAKE_CASE__							,				10**ma					)
				_SCREAMING_SNAKE_CASE		,	_SCREAMING_SNAKE_CASE			:	Optional[int]							=				divmod(SCREAMING_SNAKE_CASE__							,				10**ma					)

				_SCREAMING_SNAKE_CASE			:	Dict							=				karatsuba(SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					)
				_SCREAMING_SNAKE_CASE			:	List[Any]							=				karatsuba((aa + aa)							,				(ba + ba)					)
				_SCREAMING_SNAKE_CASE			:	List[Any]							=				karatsuba(SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					)

				return (z * 10 ** (2 * ma)) + ((y - z - x) * 10 ** (ma)) + (x)







def       snake_case_       (  ):







				"""simple docstring"""





				print(karatsuba(1_5463							,				2_3489					)					)


if __name__ == "__main__":
				main()




