"""simple docstring"""







import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils import AddedToken
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_mpnet import MPNetTokenizer


SCREAMING_SNAKE_CASE						=    logging.get_logger(__name__)

SCREAMING_SNAKE_CASE						=    {'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

SCREAMING_SNAKE_CASE						=    {
    'vocab_file': {
        'microsoft/mpnet-base': 'https://huggingface.co/microsoft/mpnet-base/resolve/main/vocab.txt',
    },
    'tokenizer_file': {
        'microsoft/mpnet-base': 'https://huggingface.co/microsoft/mpnet-base/resolve/main/tokenizer.json',
    },
}

SCREAMING_SNAKE_CASE						=    {
    'microsoft/mpnet-base': 512,
}

SCREAMING_SNAKE_CASE						=    {
    'microsoft/mpnet-base': {'do_lower_case': True},
}



class 			_lowerCamelCase      (__lowerCamelCase  ):
				_snake_case  =	VOCAB_FILES_NAMES
				_snake_case  =	PRETRAINED_VOCAB_FILES_MAP
				_snake_case  =	PRETRAINED_INIT_CONFIGURATION
				_snake_case  =	PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
				_snake_case  =	MPNetTokenizer
				_snake_case  =	["input_ids", "attention_mask"]







				def __init__(			self     :							List[Any]      ,       lowerCamelCase_     :							str=None      ,       lowerCamelCase_     :							List[Any]=None      ,       lowerCamelCase_     :							List[str]=True      ,       lowerCamelCase_     :							int="<s>"      ,       lowerCamelCase_     :							List[str]="</s>"      ,       lowerCamelCase_     :							Dict="</s>"      ,       lowerCamelCase_     :							Tuple="<s>"      ,       lowerCamelCase_     :							List[Any]="[UNK]"      ,       lowerCamelCase_     :							Optional[int]="<pad>"      ,       lowerCamelCase_     :							Any="<mask>"      ,       lowerCamelCase_     :							Any=True      ,       lowerCamelCase_     :							Dict=None      ,       **lowerCamelCase_     :							Optional[int]      ,       ):

					"""simple docstring"""






					super().__init__(
					    lowerCamelCase_      ,       tokenizer_file=lowerCamelCase_      ,       do_lower_case=lowerCamelCase_      ,       bos_token=lowerCamelCase_      ,       eos_token=lowerCamelCase_      ,       sep_token=lowerCamelCase_      ,       cls_token=lowerCamelCase_      ,       unk_token=lowerCamelCase_      ,       pad_token=lowerCamelCase_      ,       mask_token=lowerCamelCase_      ,       tokenize_chinese_chars=lowerCamelCase_      ,       strip_accents=lowerCamelCase_      ,       **lowerCamelCase_      ,       )

					_lowercase			:     Union[str, Any]      					=				json.loads(self.backend_tokenizer.normalizer.__getstate__()    )
					if (
					    pre_tok_state.get('lowercase'      ,       lowerCamelCase_    ) != do_lower_case
					    or pre_tok_state.get('strip_accents'      ,       lowerCamelCase_    ) != strip_accents
					):
						_lowercase			:     Tuple      					=				getattr(lowerCamelCase_      ,       pre_tok_state.pop('type'    )    )
						_lowercase			:     Optional[int]      					=				do_lower_case
						_lowercase			:     Optional[Any]      					=				strip_accents
						_lowercase			:     Optional[Any]      					=				pre_tok_class(**lowerCamelCase_    )

					_lowercase			:     Any      					=				do_lower_case







				@property
				def 				__UpperCAmelCase       (			self     :							Any    ):

					"""simple docstring"""






					if self._mask_token is None:
						if self.verbose:
							logger.error('Using mask_token, but it is not set yet.'    )
						return None
					return str(self._mask_token    )







				@mask_token.setter
				def 				__UpperCAmelCase       (			self     :							List[str]      ,       lowerCamelCase_     :							Tuple    ):

					"""simple docstring"""






					_lowercase			:     int      					=				AddedToken(lowerCamelCase_      ,       lstrip=lowerCamelCase_      ,       rstrip=lowerCamelCase_    ) if isinstance(lowerCamelCase_      ,       lowerCamelCase_    ) else value
					_lowercase			:     int      					=				value







				def 				__UpperCAmelCase       (			self     :							int      ,       lowerCamelCase_     :							int      ,       lowerCamelCase_     :							Optional[Any]=None    ):

					"""simple docstring"""






					_lowercase			:     List[str]      					=				[self.bos_token_id] + token_ids_a + [self.eos_token_id]
					if token_ids_a is None:
						return output

					return output + [self.eos_token_id] + token_ids_a + [self.eos_token_id]







				def 				__UpperCAmelCase       (			self     :							List[str]      ,       lowerCamelCase_     :							List[int]      ,       lowerCamelCase_     :							Optional[List[int]] = None    ):

					"""simple docstring"""






					_lowercase			:     Any      					=				[self.sep_token_id]
					_lowercase			:     Any      					=				[self.cls_token_id]

					if token_ids_a is None:
						return len(cls + token_ids_a + sep    ) * [0]
					return len(cls + token_ids_a + sep + sep + token_ids_a + sep    ) * [0]







				def 				__UpperCAmelCase       (			self     :							Any      ,       lowerCamelCase_     :							str      ,       lowerCamelCase_     :							Optional[str] = None    ):

					"""simple docstring"""






					_lowercase			:     str      					=				self._tokenizer.model.save(lowerCamelCase_      ,       name=lowerCamelCase_    )
					return tuple(lowerCamelCase_    )




"""simple docstring"""







def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





	if n == 0:
		return 1

	elif n % 2 == 1:
		return binary_exponentiation(__UpperCAmelCase  ,n - 1      ) * a

	else:
		_lowercase			:     Dict      					=				binary_exponentiation(__UpperCAmelCase  ,n / 2      )
		return b * b


if __name__ == "__main__":
						try:
												SCREAMING_SNAKE_CASE						=    int(input('Enter Base : ').strip())
												SCREAMING_SNAKE_CASE						=    int(input('Enter Power : ').strip())
						except ValueError:
												print('Invalid literal for integer')

						SCREAMING_SNAKE_CASE						=    binary_exponentiation(BASE, POWER)
						print(f"""{BASE}^({POWER}) : {RESULT}""")



