


def    _UpperCAmelCase	(   __lowerCamelCase ,     __lowerCamelCase       )		->str:


 '''simple docstring'''
 if not isinstance(__lowerCamelCase ,     __lowerCamelCase       ):
  raise TypeError('''plaintext must be a string'''       )
 if not isinstance(__lowerCamelCase ,     __lowerCamelCase       ):
  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
 snake_case   : Union[str, Any]	  =      plaintext.lower()
 snake_case   : Any	  =      key.lower()
 snake_case   : Any	  =      0
 snake_case   : Dict	  =      0
 snake_case   : Union[str, Any]	  =      ''''''
 while plaintext_iterator < len(__lowerCamelCase       ):
  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	(   __lowerCamelCase ,     __lowerCamelCase       )		->str:


 '''simple docstring'''
 if not isinstance(__lowerCamelCase ,     __lowerCamelCase       ):
  raise TypeError('''ciphertext must be a string'''       )
 if not isinstance(__lowerCamelCase ,     __lowerCamelCase       ):
  raise TypeError('''key must be a string'''       )

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

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





from itertools import permutations






def    _UpperCAmelCase	(   )		->str:


 '''simple docstring'''
 snake_case   : Any	  =      list(map(''''''.join ,     permutations('''0123456789'''       )       )       )
 return result[999999]


if __name__ == "__main__":
  print(solution())






