





"""simple docstring"""




from ..utils import DummyObject, requires_backends

class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Dict             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					int             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[str]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[str]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					int             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					str             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Any             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[str]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Union[str, Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					str             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Dict             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					str             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					str             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Union[str, Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[int]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					str             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[str]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Dict             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					str             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[int]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					str             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Any             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[int]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Any             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[int]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Dict             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Dict             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					int             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					int             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					int             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Any             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					str             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Any             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					List[str]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					int             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Optional[int]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Union[str, Any]             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Any             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Dict             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Any             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )


class 					_UpperCAmelCase    (  metaclass=UpperCAmelCase__						):



      '''simple docstring'''
      lowercase_ :					Tuple             =  ["""tokenizers"""]

      def __init__(	self   , *snake_case_   , **snake_case_    ):

        """simple docstring"""

        requires_backends(self   , ['tokenizers']    )
"""simple docstring"""


import random
import sys

__UpperCamelCase										=     '''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''







def    UpperCAmelCase       (						)							-> None:
     snake_case_   			=   input('Enter message: '   )
     snake_case_   			=   'LFWOAYUISVKMNXPBDCRJTQEGHZ'
     snake_case_   			=   input('Encrypt/Decrypt [e/d]: '   )

     check_valid_key(UpperCAmelCase   )

     if resp.lower().startswith('e'   ):
          snake_case_   			=   'encrypt'
          snake_case_   			=   encrypt_message(UpperCAmelCase		,   UpperCAmelCase   )
     elif resp.lower().startswith('d'   ):
          snake_case_   			=   'decrypt'
          snake_case_   			=   decrypt_message(UpperCAmelCase		,   UpperCAmelCase   )

     print(f'\n{mode.title()}ion: \n{translated}'   )







def    UpperCAmelCase       (						UpperCAmelCase   )							-> None:
     snake_case_   			=   list(UpperCAmelCase   )
     snake_case_   			=   list(UpperCAmelCase   )
     key_list.sort()
     letters_list.sort()

     if key_list != letters_list:
          sys.exit('Error in the key or symbol set.'   )







def    UpperCAmelCase       (						UpperCAmelCase		,   UpperCAmelCase   )							-> str:
     return translate_message(UpperCAmelCase		,   UpperCAmelCase		,   'encrypt'   )







def    UpperCAmelCase       (						UpperCAmelCase		,   UpperCAmelCase   )							-> str:
     return translate_message(UpperCAmelCase		,   UpperCAmelCase		,   'decrypt'   )







def    UpperCAmelCase       (						UpperCAmelCase		,   UpperCAmelCase		,   UpperCAmelCase   )							-> str:
     snake_case_   			=   ''
     snake_case_   			=   LETTERS
     snake_case_   			=   key

     if mode == "decrypt":
          snake_case_			,      snake_case_   			=   chars_b, chars_a

     for symbol in message:
          if symbol.upper() in chars_a:
               snake_case_   			=   chars_a.find(symbol.upper()   )
               if symbol.isupper():
                    translated += chars_b[sym_index].upper()
               else:
                    translated += chars_b[sym_index].lower()
          else:
               translated += symbol

     return translated







def    UpperCAmelCase       (						)							-> str:
     snake_case_   			=   list(UpperCAmelCase   )
     random.shuffle(UpperCAmelCase   )
     return "".join(UpperCAmelCase   )


if __name__ == "__main__":
    main()

