'''simple docstring'''




def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							)      ->       Tuple:
    __lowerCamelCase            =    ""
    for i in table:
        res += inp[i - 1]
    return res






def __lowerCAmelCase					(				UpperCamelCase__							)      ->       List[Any]:
    return data[1:] + data[0]






def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							)      ->       List[Any]:
    __lowerCamelCase            =    ""
    for i in range(len(__snake_case							)							):
        if a[i] == b[i]:
            res += "0"
        else:
            res += "1"
    return res






def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							)      ->       Union[str, Any]:
    __lowerCamelCase            =    int('''0b''' + data[0] + data[-1]							,    2							)
    __lowerCamelCase            =    int('''0b''' + data[1:3]							,    2							)
    return bin(s[row][col]							)[2:]






def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							)      ->       str:
    __lowerCamelCase            =    message[:4]
    __lowerCamelCase            =    message[4:]
    __lowerCamelCase            =    apply_table(__snake_case							,    __snake_case							)
    __lowerCamelCase            =    xor(__snake_case							,    __snake_case							)
    __lowerCamelCase            =    apply_sbox(__snake_case							,    temp[:4]							)  # noqa: E741
    __lowerCamelCase            =    apply_sbox(__snake_case							,    temp[4:]							)
    __lowerCamelCase            =    "0" * (2 - len(__snake_case							)) + l  # noqa: E741
    __lowerCamelCase            =    "0" * (2 - len(__snake_case							)) + r
    __lowerCamelCase            =    apply_table(l + r							,    __snake_case							)
    __lowerCamelCase            =    xor(__snake_case							,    __snake_case							)
    return temp + right


if __name__ == "__main__":
  __UpperCAmelCase					=input("Enter 10 bit key: ")
  __UpperCAmelCase					=input("Enter 8 bit message: ")

  __UpperCAmelCase					=[6, 3, 7, 4, 8, 5, 1_0, 9]
  __UpperCAmelCase					=[3, 5, 2, 7, 4, 1_0, 1, 9, 8, 6]
  __UpperCAmelCase					=[2, 4, 3, 1]
  __UpperCAmelCase					=[2, 6, 3, 1, 4, 8, 5, 7]
  __UpperCAmelCase					=[4, 1, 3, 5, 7, 2, 8, 6]
  __UpperCAmelCase					=[4, 1, 2, 3, 2, 3, 4, 1]
  __UpperCAmelCase					=[[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
  __UpperCAmelCase					=[[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

  # key generation
  __UpperCAmelCase					=apply_table(key, paa_table)
  __UpperCAmelCase					=temp[:5]
  __UpperCAmelCase					=temp[5:]
  __UpperCAmelCase					=left_shift(left)
  __UpperCAmelCase					=left_shift(right)
  __UpperCAmelCase					=apply_table(left + right, pa_table)
  __UpperCAmelCase					=left_shift(left)
  __UpperCAmelCase					=left_shift(right)
  __UpperCAmelCase					=left_shift(left)
  __UpperCAmelCase					=left_shift(right)
  __UpperCAmelCase					=apply_table(left + right, pa_table)

  # encryption
  __UpperCAmelCase					=apply_table(message, IP)
  __UpperCAmelCase					=function(expansion, sa, sa, keya, temp)
  __UpperCAmelCase					=temp[4:] + temp[:4]
  __UpperCAmelCase					=function(expansion, sa, sa, keya, temp)
  __UpperCAmelCase					=apply_table(temp, IP_inv)
  print("Cipher text is:", CT)

  # decryption
  __UpperCAmelCase					=apply_table(CT, IP)
  __UpperCAmelCase					=function(expansion, sa, sa, keya, temp)
  __UpperCAmelCase					=temp[4:] + temp[:4]
  __UpperCAmelCase					=function(expansion, sa, sa, keya, temp)
  __UpperCAmelCase					=apply_table(temp, IP_inv)
  print("Plain text after decypting is:", PT)


"""simple docstring"""




from collections import OrderedDict
from typing import Mapping

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


_A     :			str  						=			logging.get_logger(__name__)

_A     :			Tuple  						=			{
    """google/bigbird-roberta-base""": """https://huggingface.co/google/bigbird-roberta-base/resolve/main/config.json""",
    """google/bigbird-roberta-large""": """https://huggingface.co/google/bigbird-roberta-large/resolve/main/config.json""",
    """google/bigbird-base-trivia-itc""": """https://huggingface.co/google/bigbird-base-trivia-itc/resolve/main/config.json""",
    # See all BigBird models at https://huggingface.co/models?filter=big_bird
}

class 						a__		( a_		):
   __lowerCAmelCase				=							"""big_bird"""
   def __init__(     self      ,       _a=50_358      ,       _a=768      ,       _a=12      ,       _a=12      ,       _a=3_072      ,       _a="gelu_new"      ,       _a=0.1      ,       _a=0.1      ,       _a=4_096      ,       _a=2      ,       _a=0.0_2      ,       _a=1E-12      ,       _a=True      ,       _a=0      ,       _a=1      ,       _a=2      ,       _a=66      ,       _a="block_sparse"      ,       _a=True      ,       _a=False      ,       _a=64      ,       _a=3      ,       _a=None      ,       **_a      ,       ):
          super().__init__(
              pad_token_id=_a      ,       bos_token_id=_a      ,       eos_token_id=_a      ,       sep_token_id=_a      ,       **_a      ,       )

          lowercase       :							List[Any]									=				vocab_size
          lowercase       :							Optional[Any]									=				max_position_embeddings
          lowercase       :							str									=				hidden_size
          lowercase       :							int									=				num_hidden_layers
          lowercase       :							Optional[Any]									=				num_attention_heads
          lowercase       :							List[Any]									=				intermediate_size
          lowercase       :							int									=				hidden_act
          lowercase       :							str									=				hidden_dropout_prob
          lowercase       :							List[Any]									=				attention_probs_dropout_prob
          lowercase       :							Tuple									=				initializer_range
          lowercase       :							Optional[int]									=				type_vocab_size
          lowercase       :							str									=				layer_norm_eps
          lowercase       :							Tuple									=				use_cache

          lowercase       :							Any									=				rescale_embeddings
          lowercase       :							List[str]									=				attention_type
          lowercase       :							int									=				use_bias
          lowercase       :							Dict									=				block_size
          lowercase       :							List[str]									=				num_random_blocks
          lowercase       :							int									=				classifier_dropout


class 						a__		( a_		):
   @property
   def      __magic_name__     (     self							):
          if self.task == "multiple-choice":
                 lowercase       :							Union[str, Any]									=				{0: "batch", 1: "choice", 2: "sequence"}
          else:
                 lowercase       :							Dict									=				{0: "batch", 1: "sequence"}
          return OrderedDict(
              [
                  ("input_ids", dynamic_axis),
                  ("attention_mask", dynamic_axis),
              ]							)


