






import json
import os
import unittest

from transformers.models.xlm.tokenization_xlm import VOCAB_FILES_NAMES, XLMTokenizer
from transformers.testing_utils import slow

from ...test_tokenization_common import TokenizerTesterMixin




class 				a_					(		lowerCAmelCase__      ,      unittest.TestCase						):


							'''simple docstring'''






							__a:      Optional[int]					       =       XLMTokenizer
							__a:      List[Any]					       =       False

							def 	_lowercase			(						self  )   ->   Tuple:
														'''simple docstring'''

														super().setUp()

														# Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
														lowerCAmelCase_									=	[
														    'l',
														    'o',
														    'w',
														    'e',
														    'r',
														    's',
														    't',
														    'i',
														    'd',
														    'n',
														    'w</w>',
														    'r</w>',
														    't</w>',
														    'lo',
														    'low',
														    'er</w>',
														    'low</w>',
														    'lowest</w>',
														    'newer</w>',
														    'wider</w>',
														    '<unk>',
														]
														lowerCAmelCase_									=	dict(zip(__UpperCAmelCase     ,     range(len(__UpperCAmelCase  )  )  )  )
														lowerCAmelCase_									=	['l o 123', 'lo w 1456', 'e r</w> 1789', '']

														lowerCAmelCase_									=	os.path.join(self.tmpdirname     ,     VOCAB_FILES_NAMES['vocab_file']  )
														lowerCAmelCase_									=	os.path.join(self.tmpdirname     ,     VOCAB_FILES_NAMES['merges_file']  )
														with open(self.vocab_file     ,     'w'  ) as fp:
																					fp.write(json.dumps(__UpperCAmelCase  )  )
														with open(self.merges_file     ,     'w'  ) as fp:
																					fp.write('\n'.join(__UpperCAmelCase  )  )

							def 	_lowercase			(						self     ,     lowercase_  )   ->   Optional[Any]:
														'''simple docstring'''

														lowerCAmelCase_									=	'lower newer'
														lowerCAmelCase_									=	'lower newer'
														return input_text, output_text

							def 	_lowercase			(						self  )   ->   Union[str, Any]:
														'''simple docstring'''

														lowerCAmelCase_									=	XLMTokenizer(self.vocab_file     ,     self.merges_file  )

														lowerCAmelCase_									=	'lower'
														lowerCAmelCase_									=	['low', 'er</w>']
														lowerCAmelCase_									=	tokenizer.tokenize(__UpperCAmelCase  )
														self.assertListEqual(__UpperCAmelCase     ,     __UpperCAmelCase  )

														lowerCAmelCase_									=	tokens + ['<unk>']
														lowerCAmelCase_									=	[1_4, 1_5, 2_0]
														self.assertListEqual(tokenizer.convert_tokens_to_ids(__UpperCAmelCase  )     ,     __UpperCAmelCase  )






							@slow
							def 	_lowercase			(						self  )   ->   Dict:
														'''simple docstring'''

														lowerCAmelCase_									=	XLMTokenizer.from_pretrained('xlm-mlm-en-2048'  )

														lowerCAmelCase_									=	tokenizer.encode('sequence builders'     ,     add_special_tokens=__UpperCAmelCase  )
														lowerCAmelCase_									=	tokenizer.encode('multi-sequence build'     ,     add_special_tokens=__UpperCAmelCase  )

														lowerCAmelCase_									=	tokenizer.build_inputs_with_special_tokens(__UpperCAmelCase  )
														lowerCAmelCase_									=	tokenizer.build_inputs_with_special_tokens(__UpperCAmelCase     ,     __UpperCAmelCase  )

														assert encoded_sentence == [0] + text + [1]
														assert encoded_pair == [0] + text + [1] + text_a + [1]








def 		a__      (		_UpperCamelCase      :			int			,_UpperCamelCase      :			int				):
   while second != 0:
      __lowerCamelCase    				=     first & second
      first ^= second
      __lowerCamelCase    				=     c << 1
   return first


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  a_								=       int(input("""Enter the first number: """).strip())
  a_								=       int(input("""Enter the second number: """).strip())
  print(f"{add(first, second) = }")






