"""simple docstring"""




UpperCAmelCase       :    Optional[int]									=			{
    "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 				__a       (			_lowercase						):







					"""simple docstring"""





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



def 				__a       (			_lowercase							, _lowercase						):







					"""simple docstring"""





					lowerCamelCase__		:   Dict  				=					''''''
					lowerCamelCase__		:   Optional[Any]  				=					0
					lowerCamelCase__		:   List[Any]  				=					generate_table(UpperCamelCase_						)
					for char in words.upper():
										cipher += get_opponent(table[count]							, UpperCamelCase_						)
										lowerCamelCase__		:   Any  				=					(count + 1) % len(UpperCamelCase_						)
					return cipher



def 				__a       (			_lowercase							, _lowercase						):







					"""simple docstring"""





					return encrypt(UpperCamelCase_							, UpperCamelCase_						)



def 				__a       (			_lowercase							, _lowercase						):







					"""simple docstring"""





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



def 				__a       (			_lowercase							, _lowercase						):







					"""simple docstring"""





					lowerCamelCase__				,						lowerCamelCase__		:   List[Any]  				=					get_position(UpperCamelCase_							, 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...
					UpperCAmelCase       :    Any									=			input("Enter key: ").strip()
					UpperCAmelCase       :    int									=			input("Enter text to encrypt: ").strip()
					UpperCAmelCase       :    List[Any]									=			encrypt(key, text)

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









"""simple docstring"""





import math
from decimal import Decimal, getcontext




def     _A    (    UpperCamelCase_	:			int = 4000000)      ->		int:
   '''simple docstring'''


   try:
      __lowercase								=		int(UpperCamelCase_)
   except (TypeError, ValueError):
      raise TypeError("Parameter n must be int or castable to int.")
   if n <= 0:
      raise ValueError("Parameter n must be greater than or equal to one.")
   __lowercase								=		100
   __lowercase								=		(Decimal(5) ** Decimal(0.5) + 1) / Decimal(2)

   __lowercase								=		(math.floor(math.log(n * (phi + 2),     UpperCamelCase_) - 1) // 3) * 3 + 2
   __lowercase								=		Decimal(round(phi ** Decimal(index + 1))) / (phi + 2)
   __lowercase								=		num // 2
   return int(UpperCamelCase_)


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




