




A				:   Any		= {
    "0": 1,
    "1": 1,
    "2": 2,
    "3": 6,
    "4": 24,
    "5": 120,
    "6": 720,
    "7": 5040,
    "8": 40320,
    "9": 362880,
}

A				:   int		= {145: 145}

A				:   Any		= {
    145: 0,
    169: 3,
    36301: 3,
    1454: 3,
    871: 2,
    45361: 2,
    872: 2,
}

def 				lowercase_		(		_A      :   int						):

      """simple docstring"""




      if n in CACHE_SUM_DIGIT_FACTORIALS:
            return CACHE_SUM_DIGIT_FACTORIALS[n]
      lowerCamelCase__		:    Union[str, Any]   =  sum(DIGIT_FACTORIALS[let] for let in str(_A						)						)
      lowerCamelCase__		:    Optional[Any]   =  ret
      return ret

def 				lowercase_		(		_A      :   int   , _A      :   set | None = None						):

      """simple docstring"""




      lowerCamelCase__		:    List[str]   =  previous or set()
      if n in CHAIN_LENGTH_CACHE:
            return CHAIN_LENGTH_CACHE[n]
      lowerCamelCase__		:    Optional[Any]   =  sum_digit_factorials(_A						)
      if next_number in previous:
            lowerCamelCase__		:    str   =  0
            return 0
      else:
            previous.add(_A						)
            lowerCamelCase__		:    List[str]   =  1 + chain_length(_A   , _A						)
            lowerCamelCase__		:    str   =  ret
            return ret

def 				lowercase_		(		_A      :   int = 60   , _A      :   int = 1000000						):

      """simple docstring"""




      return sum(1 for i in range(1   , _A						) if chain_length(_A						) == num_terms						)


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






A				:   Union[str, Any]		= {
    "A": ("ABCDEFGHIJKLM", "NOPQRSTUVWXYZ"),
    "B": ("ABCDEFGHIJKLM", "NOPQRSTUVWXYZ"),
    "C": ("ABCDEFGHIJKLM", "ZNOPQRSTUVWXY"),
    "D": ("ABCDEFGHIJKLM", "ZNOPQRSTUVWXY"),
    "E": ("ABCDEFGHIJKLM", "YZNOPQRSTUVWX"),
    "F": ("ABCDEFGHIJKLM", "YZNOPQRSTUVWX"),
    "G": ("ABCDEFGHIJKLM", "XYZNOPQRSTUVW"),
    "H": ("ABCDEFGHIJKLM", "XYZNOPQRSTUVW"),
    "I": ("ABCDEFGHIJKLM", "WXYZNOPQRSTUV"),
    "J": ("ABCDEFGHIJKLM", "WXYZNOPQRSTUV"),
    "K": ("ABCDEFGHIJKLM", "VWXYZNOPQRSTU"),
    "L": ("ABCDEFGHIJKLM", "VWXYZNOPQRSTU"),
    "M": ("ABCDEFGHIJKLM", "UVWXYZNOPQRST"),
    "N": ("ABCDEFGHIJKLM", "UVWXYZNOPQRST"),
    "O": ("ABCDEFGHIJKLM", "TUVWXYZNOPQRS"),
    "P": ("ABCDEFGHIJKLM", "TUVWXYZNOPQRS"),
    "Q": ("ABCDEFGHIJKLM", "STUVWXYZNOPQR"),
    "R": ("ABCDEFGHIJKLM", "STUVWXYZNOPQR"),
    "S": ("ABCDEFGHIJKLM", "RSTUVWXYZNOPQ"),
    "T": ("ABCDEFGHIJKLM", "RSTUVWXYZNOPQ"),
    "U": ("ABCDEFGHIJKLM", "QRSTUVWXYZNOP"),
    "V": ("ABCDEFGHIJKLM", "QRSTUVWXYZNOP"),
    "W": ("ABCDEFGHIJKLM", "PQRSTUVWXYZNO"),
    "X": ("ABCDEFGHIJKLM", "PQRSTUVWXYZNO"),
    "Y": ("ABCDEFGHIJKLM", "OPQRSTUVWXYZN"),
    "Z": ("ABCDEFGHIJKLM", "OPQRSTUVWXYZN"),
}

def 				lowercase_		(		_A      :   str						):

      """simple docstring"""




      return [alphabet[char] for char in key.upper()]

def 				lowercase_		(		_A      :   str   , _A      :   str						):

      """simple docstring"""




      lowerCamelCase__		:    List[str]   =  ""
      lowerCamelCase__		:    Union[str, Any]   =  0
      lowerCamelCase__		:    Any   =  generate_table(_A						)
      for char in words.upper():
            cipher += get_opponent(table[count]   , _A						)
            lowerCamelCase__		:    Optional[int]   =  (count + 1) % len(_A						)
      return cipher

def 				lowercase_		(		_A      :   str   , _A      :   str						):

      """simple docstring"""




      return encrypt(_A   , _A						)

def 				lowercase_		(		_A      :   tuple[str, str]   , _A      :   str						):

      """simple docstring"""




      lowerCamelCase__		:    List[Any]   =  0 if char in table[0] else 1
      lowerCamelCase__		:    List[Any]   =  table[row].index(_A						)
      return row, col

def 				lowercase_		(		_A      :   tuple[str, str]   , _A      :   str						):

      """simple docstring"""




      lowerCamelCase__   ,       lowerCamelCase__		:    List[str]   =  get_position(_A   , char.upper()						)
      if row == 1:
            return table[0][col]
      else:
            return table[1][col] if row == 0 else char


if __name__ == "__main__":
    import doctest

    doctest.testmod()  # Fist ensure that all our tests are passing...
    A				:   List[str]		= input("Enter key: ").strip()
    A				:   Tuple		= input("Enter text to encrypt: ").strip()
    A				:   Dict		= encrypt(key, text)

    print(f'Encrypted: {cipher_text}')
    print(f'Decrypted with key: {decrypt(key, cipher_text)}')


