
"""simple docstring"""



def 			_UpperCamelCase						(    _A   )     ->	str:





    """simple docstring"""

    _UpperCAmelCase        = """"""
    for ch in key:
        if ch == " " or ch not in key_no_dups and ch.isalpha():
            key_no_dups += ch
    return key_no_dups


def 			_UpperCamelCase						(    _A   )     ->	dict[str, str]:





    """simple docstring"""

    _UpperCAmelCase        = [chr(i + 6_5   ) for i in range(2_6   )]
    # Remove duplicate characters from key
    _UpperCAmelCase        = remove_duplicates(key.upper()   )
    _UpperCAmelCase        = len(_A   )
    # First fill cipher with key characters
    _UpperCAmelCase        = {alphabet[i]: char for i, char in enumerate(_A   )}
    # Then map remaining characters in alphabet to
    # the alphabet from the beginning
    for i in range(len(_A   )       ,   2_6   ):
        _UpperCAmelCase        = alphabet[i - offset]
        # Ensure we are not mapping letters to letters previously mapped
        while char in key:
            offset -= 1
            _UpperCAmelCase        = alphabet[i - offset]
        _UpperCAmelCase        = char
    return cipher_alphabet


def 			_UpperCamelCase						(    _A       ,   _A   )     ->	str:





    """simple docstring"""

    return "".join(cipher_map.get(_A       ,   _A   ) for ch in message.upper()   )


def 			_UpperCamelCase						(    _A       ,   _A   )     ->	str:





    """simple docstring"""

    _UpperCAmelCase        = {v: k for k, v in cipher_map.items()}
    return "".join(rev_cipher_map.get(_A       ,   _A   ) for ch in message.upper()   )


def 			_UpperCamelCase						(    )     ->	None:





    """simple docstring"""

    _UpperCAmelCase        = input("""Enter message to encode or decode: """   ).strip()
    _UpperCAmelCase        = input("""Enter keyword: """   ).strip()
    _UpperCAmelCase        = input("""Encipher or decipher? E/D:"""   ).strip()[0].lower()
    try:
        _UpperCAmelCase        = {"""e""": encipher, """d""": decipher}[option]
    except KeyError:
        raise KeyError("""invalid input option"""   )
    _UpperCAmelCase        = create_cipher_map(_A   )
    print(func(_A       ,   _A   )   )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()

"""simple docstring"""



import warnings
from functools import wraps
from typing import Callable


def 			_UpperCamelCase						(    _A   )     ->	Callable:





    """simple docstring"""

    @wraps(_A   )
    def _inner_fn(*_A       ,   **_A   ):
        warnings.warn(
            (F"""'{fn.__name__}' is experimental and might be subject to breaking changes in the future.""")       ,   _A       ,   )
        return fn(*_A       ,   **_A   )

    return _inner_fn