





def     a_       (					lowerCAmelCase_ :     Union[str, Any],      lowerCAmelCase_ :     List[str]      ):
   __lowerCAmelCase				      =      ''
   for i in table:
      res += inp[i - 1]
   return res

def     a_       (					lowerCAmelCase_ :     Union[str, Any]      ):
   return data[1:] + data[0]

def     a_       (					lowerCAmelCase_ :     List[str],      lowerCAmelCase_ :     Optional[Any]      ):
   __lowerCAmelCase				      =      ''
   for i in range(len(lowerCAmelCase_      )      ):
      if a[i] == b[i]:
         res += "0"
      else:
         res += "1"
   return res

def     a_       (					lowerCAmelCase_ :     List[str],      lowerCAmelCase_ :     List[str]      ):
   __lowerCAmelCase				      =      int('0b' + data[0] + data[-1],      2      )
   __lowerCAmelCase				      =      int('0b' + data[1:3],      2      )
   return bin(s[row][col]      )[2:]

def     a_       (					lowerCAmelCase_ :     Any,      lowerCAmelCase_ :     Any,      lowerCAmelCase_ :     Tuple,      lowerCAmelCase_ :     List[Any],      lowerCAmelCase_ :     Any      ):
   __lowerCAmelCase				      =      message[:4]
   __lowerCAmelCase				      =      message[4:]
   __lowerCAmelCase				      =      apply_table(lowerCAmelCase_,      lowerCAmelCase_      )
   __lowerCAmelCase				      =      xor(lowerCAmelCase_,      lowerCAmelCase_      )
   __lowerCAmelCase				      =      apply_sbox(lowerCAmelCase_,      temp[:4]      )  # noqa: E741
   __lowerCAmelCase				      =      apply_sbox(lowerCAmelCase_,      temp[4:]      )
   __lowerCAmelCase				      =      '0' * (2 - len(lowerCAmelCase_      )) + l  # noqa: E741
   __lowerCAmelCase				      =      '0' * (2 - len(lowerCAmelCase_      )) + r
   __lowerCAmelCase				      =      apply_table(l + r,      lowerCAmelCase_      )
   __lowerCAmelCase				      =      xor(lowerCAmelCase_,      lowerCAmelCase_      )
   return temp + right


if __name__ == "__main__":
     _snake_case    :       str		       =    input('Enter 10 bit key: ')
     _snake_case    :       Any		       =    input('Enter 8 bit message: ')

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

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

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

     # decryption
     _snake_case    :       Tuple		       =    apply_table(CT, IP)
     _snake_case    :       Dict		       =    function(expansion, sa, sa, keya, temp)
     _snake_case    :       Optional[int]		       =    temp[4:] + temp[:4]
     _snake_case    :       Any		       =    function(expansion, sa, sa, keya, temp)
     _snake_case    :       Optional[Any]		       =    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_torch_available


__snake_case						  =		{
    """configuration_git""": ["""GIT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GitConfig""", """GitVisionConfig"""],
    """processing_git""": ["""GitProcessor"""],
}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __snake_case						  =		[
           """GIT_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """GitForCausalLM""",
           """GitModel""",
           """GitPreTrainedModel""",
           """GitVisionModel""",
       ]

if TYPE_CHECKING:
       from .configuration_git import GIT_PRETRAINED_CONFIG_ARCHIVE_MAP, GitConfig, GitVisionConfig
       from .processing_git import GitProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_git import (
                  GIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  GitForCausalLM,
                  GitModel,
                  GitPreTrainedModel,
                  GitVisionModel,
              )

else:
       import sys

       __snake_case						  =		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

