



def 						__lowerCamelCase       (      __magic_name__	:  str     , __magic_name__	:  str						):
							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
							a__:       Any											=plaintext.lower()
							a__:       List[Any]											=key.lower()
							a__:       Any											=0
							a__:       List[Any]											=0
							a__:       List[str]											=""
							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 						__lowerCamelCase       (      __magic_name__	:  str     , __magic_name__	:  str						):
							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"						)

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










from ...utils import is_transformers_available
from .pipeline_latent_diffusion_superresolution import LDMSuperResolutionPipeline


if is_transformers_available():
		from .pipeline_latent_diffusion import LDMBertModel, LDMTextToImagePipeline





