


'''simple docstring'''

def _SCREAMING_SNAKE_CASE (A    ,					A			)			->			str:






       """simple docstring"""







       lowercase__      =					''''''
       for i in table:
              res += inp[i - 1]
       return res

def _SCREAMING_SNAKE_CASE (A			)			->			List[str]:






       """simple docstring"""







       return data[1:] + data[0]

def _SCREAMING_SNAKE_CASE (A    ,					A			)			->			Dict:






       """simple docstring"""







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

def _SCREAMING_SNAKE_CASE (A    ,					A			)			->			Union[str, Any]:






       """simple docstring"""







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

def _SCREAMING_SNAKE_CASE (A    ,					A    ,					A    ,					A    ,					A			)			->			Optional[Any]:






       """simple docstring"""







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


if __name__ == "__main__":
 lowerCamelCase				:  Optional[Any]    		=      input('Enter 10 bit key: ')
 lowerCamelCase				:  Any    		=      input('Enter 8 bit message: ')

 lowerCamelCase				:  Dict    		=      [6, 3, 7, 4, 8, 5, 10, 9]
 lowerCamelCase				:  Any    		=      [3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
 lowerCamelCase				:  List[Any]    		=      [2, 4, 3, 1]
 lowerCamelCase				:  List[str]    		=      [2, 6, 3, 1, 4, 8, 5, 7]
 lowerCamelCase				:  Optional[Any]    		=      [4, 1, 3, 5, 7, 2, 8, 6]
 lowerCamelCase				:  Tuple    		=      [4, 1, 2, 3, 2, 3, 4, 1]
 lowerCamelCase				:  str    		=      [[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
 lowerCamelCase				:  Tuple    		=      [[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

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

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

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








'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowerCamelCase				:  Tuple    		=      {
    'configuration_distilbert': [
        'DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'DistilBertConfig',
        'DistilBertOnnxConfig',
    ],
    'tokenization_distilbert': ['DistilBertTokenizer'],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase				:  str    		=      ['DistilBertTokenizerFast']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase				:  List[str]    		=      [
     'DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'DistilBertForMaskedLM',
     'DistilBertForMultipleChoice',
     'DistilBertForQuestionAnswering',
     'DistilBertForSequenceClassification',
     'DistilBertForTokenClassification',
     'DistilBertModel',
     'DistilBertPreTrainedModel',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase				:  Union[str, Any]    		=      [
     'TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFDistilBertForMaskedLM',
     'TFDistilBertForMultipleChoice',
     'TFDistilBertForQuestionAnswering',
     'TFDistilBertForSequenceClassification',
     'TFDistilBertForTokenClassification',
     'TFDistilBertMainLayer',
     'TFDistilBertModel',
     'TFDistilBertPreTrainedModel',
 ]

try:
 if not is_flax_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase				:  str    		=      [
     'FlaxDistilBertForMaskedLM',
     'FlaxDistilBertForMultipleChoice',
     'FlaxDistilBertForQuestionAnswering',
     'FlaxDistilBertForSequenceClassification',
     'FlaxDistilBertForTokenClassification',
     'FlaxDistilBertModel',
     'FlaxDistilBertPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_distilbert import (
     DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP,
     DistilBertConfig,
     DistilBertOnnxConfig,
 )
 from .tokenization_distilbert import DistilBertTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_distilbert_fast import DistilBertTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_distilbert import (
      DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      DistilBertForMaskedLM,
      DistilBertForMultipleChoice,
      DistilBertForQuestionAnswering,
      DistilBertForSequenceClassification,
      DistilBertForTokenClassification,
      DistilBertModel,
      DistilBertPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_distilbert import (
      TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFDistilBertForMaskedLM,
      TFDistilBertForMultipleChoice,
      TFDistilBertForQuestionAnswering,
      TFDistilBertForSequenceClassification,
      TFDistilBertForTokenClassification,
      TFDistilBertMainLayer,
      TFDistilBertModel,
      TFDistilBertPreTrainedModel,
  )

 try:
  if not is_flax_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_flax_distilbert import (
      FlaxDistilBertForMaskedLM,
      FlaxDistilBertForMultipleChoice,
      FlaxDistilBertForQuestionAnswering,
      FlaxDistilBertForSequenceClassification,
      FlaxDistilBertForTokenClassification,
      FlaxDistilBertModel,
      FlaxDistilBertPreTrainedModel,
  )

else:
 import sys

 lowerCamelCase				:  int    		=      _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




