




'''simple docstring'''






UpperCamelCase__:       Dict							     =      {
    "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 			snake_case_					( _lowerCAmelCase  :						str  )				->       list[tuple[str, str]]:
							return [alphabet[char] for char in key.upper()]


def 			snake_case_					( _lowerCAmelCase  :						str       ,				_lowerCAmelCase  :						str  )				->       str:
							UpperCAmelCase			:	str										=		''''''
							UpperCAmelCase			:	Union[str, Any]										=		0
							UpperCAmelCase			:	Tuple										=		generate_table(_lowerCAmelCase  )
							for char in words.upper():
														cipher += get_opponent(table[count]       ,				_lowerCAmelCase  )
														UpperCAmelCase			:	List[Any]										=		(count + 1) % len(_lowerCAmelCase  )
							return cipher


def 			snake_case_					( _lowerCAmelCase  :						str       ,				_lowerCAmelCase  :						str  )				->       str:
							return encrypt(_lowerCAmelCase       ,				_lowerCAmelCase  )


def 			snake_case_					( _lowerCAmelCase  :						tuple[str, str]       ,				_lowerCAmelCase  :						str  )				->       tuple[int, int]:
							UpperCAmelCase			:	List[str]										=		0 if char in table[0] else 1
							UpperCAmelCase			:	Tuple										=		table[row].index(_lowerCAmelCase  )
							return row, col


def 			snake_case_					( _lowerCAmelCase  :						tuple[str, str]       ,				_lowerCAmelCase  :						str  )				->       str:
							UpperCAmelCase			:	Any										=		get_position(_lowerCAmelCase       ,				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__:       Optional[int]							     =      input("Enter key: ").strip()
						UpperCamelCase__:       str							     =      input("Enter text to encrypt: ").strip()
						UpperCamelCase__:       Tuple							     =      encrypt(key, text)

						print(F"Encrypted: {cipher_text}")
						print(F"Decrypted with key: {decrypt(key, cipher_text)}")










'''simple docstring'''






import re


def 			snake_case_					( _lowerCAmelCase  :						List[str]  )				->       Dict:
							def docstring_decorator(_lowerCAmelCase  :						List[str]  ):
														UpperCAmelCase			:	str										=		fn.__doc__
														UpperCAmelCase			:	List[str]										=		func_doc.split('''\n'''  )
														UpperCAmelCase			:	Optional[Any]										=		0
														while i < len(_lowerCAmelCase  ) and re.search(R'''^\s*Examples?:\s*$'''       ,				lines[i]  ) is None:
																					i += 1
														if i < len(_lowerCAmelCase  ):
																					UpperCAmelCase			:	Union[str, Any]										=		example_docstring
																					UpperCAmelCase			:	Tuple										=		'''\n'''.join(_lowerCAmelCase  )
														else:
																					raise ValueError(
																					    f"""The function {fn} should have an empty 'Examples:' in its docstring as placeholder, """
																					    f"""current docstring is:\n{func_doc}"""  )
														UpperCAmelCase			:	Any										=		func_doc
														return fn

							return docstring_decorator





