


'''simple docstring'''
def      a (     __a					,   __a  )    ->      Any:



					'''simple docstring'''






					UpperCamelCase__  :Union[str, Any]				   =					''''''
					for i in table:
										res += inp[i - 1]
					return res


def      a (     __a  )    ->      List[str]:



					'''simple docstring'''






					return data[1:] + data[0]


def      a (     __a					,   __a  )    ->      Union[str, Any]:



					'''simple docstring'''






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


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



					'''simple docstring'''






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


def      a (     __a					,   __a					,   __a					,   __a					,   __a  )    ->      Optional[Any]:



					'''simple docstring'''






					UpperCamelCase__  :Any				   =					message[:4]
					UpperCamelCase__  :int				   =					message[4:]
					UpperCamelCase__  :Tuple				   =					apply_table(__a					,   __a  )
					UpperCamelCase__  :int				   =					xor(__a					,   __a  )
					UpperCamelCase__  :Dict				   =					apply_sbox(__a					,   temp[:4]  )  # noqa: E741
					UpperCamelCase__  :Tuple				   =					apply_sbox(__a					,   temp[4:]  )
					UpperCamelCase__  :Optional[int]				   =					'''0''' * (2 - len(__a  )) + l  # noqa: E741
					UpperCamelCase__  :Optional[int]				   =					'''0''' * (2 - len(__a  )) + r
					UpperCamelCase__  :List[str]				   =					apply_table(l + r					,   __a  )
					UpperCamelCase__  :Tuple				   =					xor(__a					,   __a  )
					return temp + right


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

		__snake_case				 =	[6, 3, 7, 4, 8, 5, 10, 9]
		__snake_case				 =	[3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
		__snake_case				 =	[2, 4, 3, 1]
		__snake_case				 =	[2, 6, 3, 1, 4, 8, 5, 7]
		__snake_case				 =	[4, 1, 3, 5, 7, 2, 8, 6]
		__snake_case				 =	[4, 1, 2, 3, 2, 3, 4, 1]
		__snake_case				 =	[[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
		__snake_case				 =	[[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

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

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

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



'''simple docstring'''
import os
import unittest

from transformers import LxmertTokenizer, LxmertTokenizerFast
from transformers.models.bert.tokenization_bert import VOCAB_FILES_NAMES
from transformers.testing_utils import require_tokenizers

from ...test_tokenization_common import TokenizerTesterMixin
@require_tokenizers
class   lowercase      (				A__      ,						unittest.TestCase   ):

		"""simple docstring"""

		_a       					=							LxmertTokenizer
		_a       					=							LxmertTokenizerFast
		_a       					=							True
		_a       					=							True




		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							super().setUp()

							UpperCamelCase__  :Any				   =					[
							    '''[UNK]''',
							    '''[CLS]''',
							    '''[SEP]''',
							    '''want''',
							    '''##want''',
							    '''##ed''',
							    '''wa''',
							    '''un''',
							    '''runn''',
							    '''##ing''',
							    ''',''',
							    '''low''',
							    '''lowest''',
							]
							UpperCamelCase__  :str				   =					os.path.join(self.tmpdirname       ,  VOCAB_FILES_NAMES['''vocab_file''']				)
							with open(self.vocab_file       ,  '''w'''       ,  encoding='''utf-8'''				) as vocab_writer:
												vocab_writer.write(''''''.join([x + '''\n''' for x in vocab_tokens]				)				)




		def        lowerCAmelCase__							(						self       ,  UpperCamelCase_				):

							'''simple docstring'''


							UpperCamelCase__  :Optional[Any]				   =					'''UNwant\u00E9d,running'''
							UpperCamelCase__  :Union[str, Any]				   =					'''unwanted, running'''
							return input_text, output_text




		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							UpperCamelCase__  :List[Any]				   =					self.tokenizer_class(self.vocab_file				)

							UpperCamelCase__  :List[Any]				   =					tokenizer.tokenize('''UNwant\u00E9d,running'''				)
							self.assertListEqual(UpperCamelCase_       ,  ['''un''', '''##want''', '''##ed''', ''',''', '''runn''', '''##ing''']				)
							self.assertListEqual(tokenizer.convert_tokens_to_ids(UpperCamelCase_				)       ,  [7, 4, 5, 10, 8, 9]				)




		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							if not self.test_rust_tokenizer:
												return

							UpperCamelCase__  :str				   =					self.get_tokenizer()
							UpperCamelCase__  :Union[str, Any]				   =					self.get_rust_tokenizer()

							UpperCamelCase__  :int				   =					'''I was born in 92000, and this is falsé.'''

							UpperCamelCase__  :Optional[Any]				   =					tokenizer.tokenize(UpperCamelCase_				)
							UpperCamelCase__  :str				   =					rust_tokenizer.tokenize(UpperCamelCase_				)
							self.assertListEqual(UpperCamelCase_       ,  UpperCamelCase_				)

							UpperCamelCase__  :Optional[Any]				   =					tokenizer.encode(UpperCamelCase_       ,  add_special_tokens=UpperCamelCase_				)
							UpperCamelCase__  :int				   =					rust_tokenizer.encode(UpperCamelCase_       ,  add_special_tokens=UpperCamelCase_				)
							self.assertListEqual(UpperCamelCase_       ,  UpperCamelCase_				)

							UpperCamelCase__  :Optional[int]				   =					self.get_rust_tokenizer()
							UpperCamelCase__  :Any				   =					tokenizer.encode(UpperCamelCase_				)
							UpperCamelCase__  :Optional[int]				   =					rust_tokenizer.encode(UpperCamelCase_				)
							self.assertListEqual(UpperCamelCase_       ,  UpperCamelCase_				)