






'''simple docstring'''






from string import ascii_uppercase

__A    	=   {char: i for i, char in enumerate(ascii_uppercase)}
__A    	=   dict(enumerate(ascii_uppercase))




def        _SCREAMING_SNAKE_CASE  (				A  :       str  ,		A  :       str  )    -> str:







   """simple docstring"""
   __snake_case				:      Dict     							= len(A  )
   __snake_case				:      Tuple     							= 0
   while True:
      if x == i:
         __snake_case				:      Tuple     							= 0
      if len(A  ) == len(A  ):
         break
      key += key[i]
      i += 1
   return key




def        _SCREAMING_SNAKE_CASE  (				A  :       str  ,		A  :       str  )    -> str:







   """simple docstring"""
   __snake_case				:      Any     							= ''
   __snake_case				:      int     							= 0
   for letter in message:
      if letter == " ":
         cipher_text += " "
      else:
         __snake_case				:      Tuple     							= (dicta[letter] - dicta[key_new[i]]) % 26
         i += 1
         cipher_text += dicta[x]
   return cipher_text




def        _SCREAMING_SNAKE_CASE  (				A  :       str  ,		A  :       str  )    -> str:







   """simple docstring"""
   __snake_case				:      Union[str, Any]     							= ''
   __snake_case				:      Optional[Any]     							= 0
   for letter in cipher_text:
      if letter == " ":
         or_txt += " "
      else:
         __snake_case				:      int     							= (dicta[letter] + dicta[key_new[i]] + 26) % 26
         i += 1
         or_txt += dicta[x]
   return or_txt




def        _SCREAMING_SNAKE_CASE  (				)    -> None:







   """simple docstring"""
   __snake_case				:      List[str]     							= 'THE GERMAN ATTACK'
   __snake_case				:      Optional[int]     							= 'SECRET'
   __snake_case				:      Any     							= generate_key(A  ,		A  )
   __snake_case				:      Optional[int]     							= cipher_text(A  ,		A  )
   print(F"""Encrypted Text = {s}"""  )
   print(F"""Original Text = {original_text(A  ,		A  )}"""  )


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      main()







'''simple docstring'''






from functools import lru_cache




@lru_cache
def        _SCREAMING_SNAKE_CASE  (				A  :       int  )    -> int:







   """simple docstring"""
   if num < 0:
      raise ValueError('Number should not be negative.'  )

   return 1 if num in (0, 1) else num * factorial(num - 1  )


if __name__ == "__main__":
      import doctest

      doctest.testmod()