



def 						UpperCAmelCase__   (   UpperCAmelCase__			:str			,       UpperCAmelCase__			:str       ):






 '''simple docstring'''

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






 '''simple docstring'''

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

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

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







import decimal



def    UpperCAmelCase__	(  ):
  lowercase     :int   						=    0
  lowercase     :str   						=    decimal.Context(prec=105 )
  for i in range(2,      100 ):
    lowercase     :int   						=    decimal.Decimal(lowerCamelCase )
    lowercase     :str   						=    number.sqrt(lowerCamelCase )
    if len(str(lowerCamelCase ) ) > 1:
      answer += int(str(lowerCamelCase )[0] )
      lowercase     :int   						=    str(lowerCamelCase )[2:101]
      answer += sum(int(lowerCamelCase ) for x in sqrt_number_str )
  return answer


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     print(f'''{solution() = }''')



