





"""simple docstring"""




def 			a_							(				_lowercase			,		_lowercase  ):
						if not isinstance(_lowercase			,		_lowercase  ):
												raise TypeError('''plaintext must be a string'''  )
						if not isinstance(_lowercase			,		_lowercase  ):
												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     :   int      =       plaintext.lower()
						_UpperCamelCase     :   Tuple      =       key.lower()
						_UpperCamelCase     :   int      =       0
						_UpperCamelCase     :   Any      =       0
						_UpperCamelCase     :   List[str]      =       ''''''
						while plaintext_iterator < len(_lowercase  ):
												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 			a_							(				_lowercase			,		_lowercase  ):
						if not isinstance(_lowercase			,		_lowercase  ):
												raise TypeError('''ciphertext must be a string'''  )
						if not isinstance(_lowercase			,		_lowercase  ):
												raise TypeError('''key must be a string'''  )

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

						_UpperCamelCase     :   List[Any]      =       key.lower()
						_UpperCamelCase     :   Tuple      =       0
						_UpperCamelCase     :   str      =       0
						_UpperCamelCase     :   Tuple      =       ''''''
						while ciphertext_iterator < len(_lowercase  ):
												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""")





import sys

sys.set_int_max_str_digits(0)  # type: ignore





def        lowerCAmelCase       (				snake_case__   :      int )->			bool:
    A_								=					[0] * 11
    A_								=					[0] * 11

    # mark last 9 numbers
    for _ in range(9 ):
        A_								=					1
        A_								=					number // 10
    # flag
    A_								=					True

    # check last 9 numbers for pandigitality

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

    # mark first 9 numbers
    A_								=					int(str(snake_case__ )[:9] )

    for _ in range(9 ):
        A_								=					1
        A_								=					number // 10

    # check first 9 numbers for pandigitality

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





def        lowerCAmelCase       (				snake_case__   :      int )->			bool:
    A_								=					[0] * 11

    # mark last 9 numbers
    for _ in range(9 ):
        A_								=					1
        A_								=					number // 10
    # flag
    A_								=					True

    # check last 9 numbers for pandigitality

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





def        lowerCAmelCase       (				)->			int:
    A_								=					1
    A_								=					1
    A_								=					2
    # temporary Fibonacci numbers

    A_								=					1
    A_								=					1
    A_								=					2
    # temporary Fibonacci numbers mod 1e9

    # mod m=1e9, done for fast optimisation
    A_								=					[0] * 1000000
    A_								=					1000000000

    for x in range(1000000 ):
        A_								=					(aa + ba) % m
        A_								=					ba % m
        A_								=					ca % m
        if checka(snake_case__ ):
            A_								=					1

    for x in range(1000000 ):
        A_								=					a + b
        A_								=					b
        A_								=					c
        # perform check only if in tocheck
        if tocheck[x + 3] and check(snake_case__ ):
            return x + 3  # first 2 already done
    return -1


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






