'''simple docstring'''

def  _lowerCAmelCase				(				__a			,      __a      )  ->      str:
     '''simple docstring'''







     if not isinstance(__a			,      __a      ):
          raise TypeError("""plaintext must be a string"""      )
     if not isinstance(__a			,      __a      ):
          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
     _UpperCamelCase  :Optional[Any]       =plaintext.lower()
     _UpperCamelCase  :List[str]       =key.lower()
     _UpperCamelCase  :Union[str, Any]       =0
     _UpperCamelCase  :Dict       =0
     _UpperCamelCase  :Any       =""""""
     while plaintext_iterator < len(__a      ):
          if (
              ord(plaintext[plaintext_iterator]      ) < 97
              or ord(plaintext[plaintext_iterator]      ) > 1_22
          ):
               ciphertext += plaintext[plaintext_iterator]
               plaintext_iterator += 1
          elif ord(key[key_iterator]      ) < 97 or ord(key[key_iterator]      ) > 1_22:
               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				(				__a			,      __a      )  ->      str:
     '''simple docstring'''







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

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

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

'''simple docstring'''







def 				_snake_case (		lowercase						)       ->       int:
				if not isinstance(lowercase			,    lowercase						):
								__a       :     Union[str, Any]								=	F"""Input value of [number={number}] must be an integer"""
								raise TypeError(lowercase						)
				if number < 1:
								raise ValueError("""Input must be a positive integer"""						)
				return number * (2 * number - 1)


if __name__ == "__main__":
					import doctest

					doctest.testmod()