


def 				UpperCamelCase      (			__magic_name__  :							str					,					__magic_name__  :							str  )     ->						str:
		"""simple docstring"""




		if not isinstance(__magic_name__					,					__magic_name__  ):
				raise TypeError("""plaintext must be a string"""  )
		if not isinstance(__magic_name__					,					__magic_name__  ):
				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
		lowercase__      =	plaintext.lower()
		lowercase__      =	key.lower()
		lowercase__      =	0
		lowercase__      =	0
		lowercase__      =	""""""
		while plaintext_iterator < len(__magic_name__  ):
				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 				UpperCamelCase      (			__magic_name__  :							str					,					__magic_name__  :							str  )     ->						str:
		"""simple docstring"""




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

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

		lowercase__      =	key.lower()
		lowercase__      =	0
		lowercase__      =	0
		lowercase__      =	""""""
		while ciphertext_iterator < len(__magic_name__  ):
				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()
	A :	Dict												=     int(input('Type 1 to encrypt or 2 to decrypt:'))
	if operation == 1:
		A :	Any												=     input('Typeplaintext to be encrypted:\n')
		A :	Any												=     input('Type the key:\n')
		print(encrypt(plaintext, key))
	elif operation == 2:
		A :	List[str]												=     input('Type the ciphertext to be decrypted:\n')
		A :	Tuple												=     input('Type the key:\n')
		print(decrypt(ciphertext, key))
	decrypt('jsqqs avvwo', 'coffee')





from __future__ import annotations






def 				UpperCamelCase      (			__magic_name__  :							list[list[int]]					,					__magic_name__  :							list[list[int]]  )     ->						list[int]:
		"""simple docstring"""




		assert len(__magic_name__  ) == len(__magic_name__  )

		lowercase__      =	len(__magic_name__  )
		lowercase__      =	list(range(__magic_name__  )  )
		lowercase__      =	[-1] * n  # who the donor has donated to
		lowercase__      =	[-1] * n  # who the recipient has received from
		lowercase__      =	[0] * n

		while unmatched_donors:
				lowercase__      =	unmatched_donors[0]
				lowercase__      =	donor_pref[donor]
				lowercase__      =	donor_preference[num_donations[donor]]
				num_donations[donor] += 1
				lowercase__      =	recipient_pref[recipient]
				lowercase__      =	rec_record[recipient]

				if prev_donor != -1:
						if rec_preference.index(__magic_name__  ) > rec_preference.index(__magic_name__  ):
								lowercase__      =	donor
								lowercase__      =	recipient
								unmatched_donors.append(__magic_name__  )
								unmatched_donors.remove(__magic_name__  )
				else:
						lowercase__      =	donor
						lowercase__      =	recipient
						unmatched_donors.remove(__magic_name__  )
		return donor_record

