


a					:				List[str]       =      {
    """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  _UpperCAmelCase						( __lowerCamelCase							)		->Union[str, Any]:


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






def  _UpperCAmelCase						( __lowerCamelCase			,  __lowerCamelCase							)		->Union[str, Any]:


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






def  _UpperCAmelCase						( __lowerCamelCase			,  __lowerCamelCase							)		->Tuple:


 '''simple docstring'''
 return encrypt(__lowerCamelCase			,  __lowerCamelCase							)






def  _UpperCAmelCase						( __lowerCamelCase			,  __lowerCamelCase							)		->Dict:


 '''simple docstring'''
 snake_case :			Dict							=   0 if char in table[0] else 1
 snake_case :			str							=   table[row].index(__lowerCamelCase							)
 return row, col






def  _UpperCAmelCase						( __lowerCamelCase			,  __lowerCamelCase							)		->Any:


 '''simple docstring'''
 snake_case	,       snake_case :			List[str]							=   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...
  a					:				int       =      input('Enter key: ').strip()
  a					:				Optional[int]       =      input('Enter text to encrypt: ').strip()
  a					:				Any       =      encrypt(key, text)

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












from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__A    :				List[str]    						=	logging.get_logger(__name__)

__A    :				List[Any]    						=	{
    """mnaylor/mega-base-wikitext""": """https://huggingface.co/mnaylor/mega-base-wikitext/resolve/main/config.json""",
}




class       UpperCAmelCase_   ( A							):




							'''simple docstring'''



							a__    	=  '''mega'''





							def __init__(       self							:						Any							,  a							:						List[str]=30_522							,  a							:						Dict=128							,  a							:						Dict=4							,  a							:						Union[str, Any]=256							,  a							:						Tuple=16							,  a							:						Any=True							,  a							:						Dict=64							,  a							:						Union[str, Any]=False							,  a							:						Tuple=-1							,  a							:						str=None							,  a							:						int=True							,  a							:						Optional[int]="scalenorm"							,  a							:						Optional[int]=True							,  a							:						Dict="silu"							,  a							:						Optional[Any]="softmax"							,  a							:						Any=0.1							,  a							:						List[Any]=0.1							,  a							:						Tuple=0.1							,  a							:						Optional[int]=False							,  a							:						List[str]=True							,  a							:						Optional[int]=256							,  a							:						List[str]=True							,  a							:						int=0.1							,  a							:						str=2_048							,  a							:						Tuple=False							,  a							:						Optional[int]=2							,  a							:						Optional[int]=0.02							,  a							:						Optional[int]=0.2							,  a							:						Union[str, Any]=0.02							,  a							:						str=1.0							,  a							:						Dict=1							,  a							:						Union[str, Any]=0							,  a							:						Dict=2							,  a							:						List[str]="rotary"							,  a							:						Union[str, Any]=None							,  a							:						List[Any]=True							,  a							:						Tuple=True							,  **a							:						Optional[int]							,  )      ->       Dict:
										super().__init__(pad_token_id=a							,  bos_token_id=a							,  eos_token_id=a							,  **a      )

										SCREAMING_SNAKE_CASE     =       vocab_size
										SCREAMING_SNAKE_CASE     =       hidden_size
										SCREAMING_SNAKE_CASE     =       num_hidden_layers
										SCREAMING_SNAKE_CASE     =       activation
										SCREAMING_SNAKE_CASE     =       attention_activation
										SCREAMING_SNAKE_CASE     =       intermediate_size
										SCREAMING_SNAKE_CASE     =       ema_projection_size
										SCREAMING_SNAKE_CASE     =       bidirectional
										SCREAMING_SNAKE_CASE     =       shared_representation_size
										SCREAMING_SNAKE_CASE     =       use_chunking
										SCREAMING_SNAKE_CASE     =       chunk_size
										SCREAMING_SNAKE_CASE     =       truncation
										SCREAMING_SNAKE_CASE     =       normalize_before_mega
										SCREAMING_SNAKE_CASE     =       normalization_type
										SCREAMING_SNAKE_CASE     =       norm_affine
										SCREAMING_SNAKE_CASE     =       dropout_prob
										SCREAMING_SNAKE_CASE     =       hidden_dropout_prob
										SCREAMING_SNAKE_CASE     =       attention_probs_dropout_prob
										SCREAMING_SNAKE_CASE     =       use_feature_dropout
										SCREAMING_SNAKE_CASE     =       use_normalized_ffn
										SCREAMING_SNAKE_CASE     =       nffn_hidden_size
										SCREAMING_SNAKE_CASE     =       normalize_before_ffn
										SCREAMING_SNAKE_CASE     =       nffn_activation_dropout_prob
										SCREAMING_SNAKE_CASE     =       max_positions
										SCREAMING_SNAKE_CASE     =       add_token_type_embeddings
										SCREAMING_SNAKE_CASE     =       type_vocab_size
										SCREAMING_SNAKE_CASE     =       initializer_range
										SCREAMING_SNAKE_CASE     =       ema_delta_alpha_range
										SCREAMING_SNAKE_CASE     =       ema_beta_range
										SCREAMING_SNAKE_CASE     =       ema_gamma_omega_range
										SCREAMING_SNAKE_CASE     =       relative_positional_bias
										SCREAMING_SNAKE_CASE     =       use_cache
										SCREAMING_SNAKE_CASE     =       classifier_dropout
										SCREAMING_SNAKE_CASE     =       add_lm_hidden_dense_layer
										SCREAMING_SNAKE_CASE     =       1  # not used but required by Hugging Face





class       UpperCAmelCase_   ( A							):




							'''simple docstring'''



							@property
							def  _UpperCAmelCase  (       self							:						Union[str, Any]      )      ->       Mapping[str, Mapping[int, str]]:
										if self.task == "multiple-choice":
													SCREAMING_SNAKE_CASE     =       {0: """batch""", 1: """choice""", 2: """sequence"""}
										else:
													SCREAMING_SNAKE_CASE     =       {0: """batch""", 1: """sequence"""}
										return OrderedDict(
										    [
										        ("""input_ids""", dynamic_axis),
										        ("""attention_mask""", dynamic_axis),
										    ]      )






