




'''simple docstring'''





def      __a     (       _UpperCamelCase:   Tuple ,						_UpperCamelCase:   List[Any]   )						->			Dict:

     """simple docstring"""




     _snake_case							=				""
     for i in table:
          res += inp[i - 1]
     return res





def      __a     (       _UpperCamelCase:   int   )						->			Optional[Any]:

     """simple docstring"""




     return data[1:] + data[0]





def      __a     (       _UpperCamelCase:   Optional[Any] ,						_UpperCamelCase:   Union[str, Any]   )						->			List[Any]:

     """simple docstring"""




     _snake_case							=				""
     for i in range(len(_UpperCamelCase   )   ):
          if a[i] == b[i]:
               res += "0"
          else:
               res += "1"
     return res





def      __a     (       _UpperCamelCase:   Tuple ,						_UpperCamelCase:   List[Any]   )						->			Tuple:

     """simple docstring"""




     _snake_case							=				int("0b" + data[0] + data[-1] ,						2   )
     _snake_case							=				int("0b" + data[1:3] ,						2   )
     return bin(s[row][col]   )[2:]





def      __a     (       _UpperCamelCase:   Tuple ,						_UpperCamelCase:   str ,						_UpperCamelCase:   int ,						_UpperCamelCase:   int ,						_UpperCamelCase:   str   )						->			int:

     """simple docstring"""




     _snake_case							=				message[:4]
     _snake_case							=				message[4:]
     _snake_case							=				apply_table(_UpperCamelCase ,						_UpperCamelCase   )
     _snake_case							=				xor(_UpperCamelCase ,						_UpperCamelCase   )
     _snake_case							=				apply_sbox(_UpperCamelCase ,						temp[:4]   )  # noqa: E741
     _snake_case							=				apply_sbox(_UpperCamelCase ,						temp[4:]   )
     _snake_case							=				"0" * (2 - len(_UpperCamelCase   )) + l  # noqa: E741
     _snake_case							=				"0" * (2 - len(_UpperCamelCase   )) + r
     _snake_case							=				apply_table(l + r ,						_UpperCamelCase   )
     _snake_case							=				xor(_UpperCamelCase ,						_UpperCamelCase   )
     return temp + right


if __name__ == "__main__":
   UpperCamelCase_						:      Union[str, Any]       =						input('''Enter 10 bit key: ''')
   UpperCamelCase_						:      List[Any]       =						input('''Enter 8 bit message: ''')

   UpperCamelCase_						:      Union[str, Any]       =						[6, 3, 7, 4, 8, 5, 10, 9]
   UpperCamelCase_						:      Any       =						[3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
   UpperCamelCase_						:      List[Any]       =						[2, 4, 3, 1]
   UpperCamelCase_						:      Optional[Any]       =						[2, 6, 3, 1, 4, 8, 5, 7]
   UpperCamelCase_						:      str       =						[4, 1, 3, 5, 7, 2, 8, 6]
   UpperCamelCase_						:      str       =						[4, 1, 2, 3, 2, 3, 4, 1]
   UpperCamelCase_						:      Optional[int]       =						[[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
   UpperCamelCase_						:      int       =						[[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

   # key generation
   UpperCamelCase_						:      Dict       =						apply_table(key, paa_table)
   UpperCamelCase_						:      List[str]       =						temp[:5]
   UpperCamelCase_						:      str       =						temp[5:]
   UpperCamelCase_						:      Tuple       =						left_shift(left)
   UpperCamelCase_						:      Dict       =						left_shift(right)
   UpperCamelCase_						:      Optional[Any]       =						apply_table(left + right, pa_table)
   UpperCamelCase_						:      Optional[Any]       =						left_shift(left)
   UpperCamelCase_						:      int       =						left_shift(right)
   UpperCamelCase_						:      Optional[Any]       =						left_shift(left)
   UpperCamelCase_						:      List[str]       =						left_shift(right)
   UpperCamelCase_						:      Tuple       =						apply_table(left + right, pa_table)

   # encryption
   UpperCamelCase_						:      Optional[int]       =						apply_table(message, IP)
   UpperCamelCase_						:      Optional[int]       =						function(expansion, sa, sa, keya, temp)
   UpperCamelCase_						:      List[str]       =						temp[4:] + temp[:4]
   UpperCamelCase_						:      Optional[int]       =						function(expansion, sa, sa, keya, temp)
   UpperCamelCase_						:      List[str]       =						apply_table(temp, IP_inv)
   print('''Cipher text is:''', CT)

   # decryption
   UpperCamelCase_						:      int       =						apply_table(CT, IP)
   UpperCamelCase_						:      Optional[int]       =						function(expansion, sa, sa, keya, temp)
   UpperCamelCase_						:      Optional[int]       =						temp[4:] + temp[:4]
   UpperCamelCase_						:      str       =						function(expansion, sa, sa, keya, temp)
   UpperCamelCase_						:      Union[str, Any]       =						apply_table(temp, IP_inv)
   print('''Plain text after decypting is:''', PT)








'''simple docstring'''





from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase_						:      int       =						logging.get_logger(__name__)

UpperCamelCase_						:      Tuple       =						{
    '''sayakpaul/vit-msn-base''': '''https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json''',
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}

class        _a    (						__lowerCAmelCase							):
     SCREAMING_SNAKE_CASE_							:   List[str]       =						"""vit_msn"""






     def __init__(			self ,_SCREAMING_SNAKE_CASE=768 ,_SCREAMING_SNAKE_CASE=12 ,_SCREAMING_SNAKE_CASE=12 ,_SCREAMING_SNAKE_CASE=3_072 ,_SCREAMING_SNAKE_CASE="gelu" ,_SCREAMING_SNAKE_CASE=0.0 ,_SCREAMING_SNAKE_CASE=0.0 ,_SCREAMING_SNAKE_CASE=0.0_2 ,_SCREAMING_SNAKE_CASE=1e-06 ,_SCREAMING_SNAKE_CASE=224 ,_SCREAMING_SNAKE_CASE=16 ,_SCREAMING_SNAKE_CASE=3 ,_SCREAMING_SNAKE_CASE=True ,**_SCREAMING_SNAKE_CASE ,)							->      int:
          super().__init__(**_SCREAMING_SNAKE_CASE   )

          _snake_case							=				hidden_size
          _snake_case							=				num_hidden_layers
          _snake_case							=				num_attention_heads
          _snake_case							=				intermediate_size
          _snake_case							=				hidden_act
          _snake_case							=				hidden_dropout_prob
          _snake_case							=				attention_probs_dropout_prob
          _snake_case							=				initializer_range
          _snake_case							=				layer_norm_eps
          _snake_case							=				image_size
          _snake_case							=				patch_size
          _snake_case							=				num_channels
          _snake_case							=				qkv_bias


