


from collections import defaultdict


def 				SCREAMING_SNAKE_CASE (     UpperCAmelCase__ = 5							):

				"""simple docstring"""






				_SCREAMING_SNAKE_CASE      = defaultdict(UpperCAmelCase__							)
				_SCREAMING_SNAKE_CASE      = 0

				while True:
								_SCREAMING_SNAKE_CASE      = get_digits(UpperCAmelCase__							)
								freqs[digits].append(UpperCAmelCase__							)

								if len(freqs[digits]							) == max_base:
												_SCREAMING_SNAKE_CASE      = freqs[digits][0] ** 3
												return base

								num += 1


def 				SCREAMING_SNAKE_CASE (     UpperCAmelCase__							):

				"""simple docstring"""






				return "".join(sorted(str(num**3							)							)							)


if __name__ == "__main__":
							print(f"""{solution() = }""")




import json
from typing import TYPE_CHECKING, List, Optional, Tuple

from tokenizers import pre_tokenizers

from ...tokenization_utils_base import AddedToken, BatchEncoding
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_deberta import DebertaTokenizer


if TYPE_CHECKING:
							from transformers.pipelines.conversational import Conversation


snake_case			:      Dict 							=   logging.get_logger(__name__)

snake_case			:      List[str] 							=   {'vocab_file': 'vocab.json', 'merges_file': 'merges.txt', 'tokenizer_file': 'tokenizer.json'}

snake_case			:      Any 							=   {
    'vocab_file': {
        'microsoft/deberta-base': 'https://huggingface.co/microsoft/deberta-base/resolve/main/vocab.json',
        'microsoft/deberta-large': 'https://huggingface.co/microsoft/deberta-large/resolve/main/vocab.json',
        'microsoft/deberta-xlarge': 'https://huggingface.co/microsoft/deberta-xlarge/resolve/main/vocab.json',
        'microsoft/deberta-base-mnli': 'https://huggingface.co/microsoft/deberta-base-mnli/resolve/main/vocab.json',
        'microsoft/deberta-large-mnli': 'https://huggingface.co/microsoft/deberta-large-mnli/resolve/main/vocab.json',
        'microsoft/deberta-xlarge-mnli': (
            'https://huggingface.co/microsoft/deberta-xlarge-mnli/resolve/main/vocab.json'
        ),
    },
    'merges_file': {
        'microsoft/deberta-base': 'https://huggingface.co/microsoft/deberta-base/resolve/main/merges.txt',
        'microsoft/deberta-large': 'https://huggingface.co/microsoft/deberta-large/resolve/main/merges.txt',
        'microsoft/deberta-xlarge': 'https://huggingface.co/microsoft/deberta-xlarge/resolve/main/merges.txt',
        'microsoft/deberta-base-mnli': 'https://huggingface.co/microsoft/deberta-base-mnli/resolve/main/merges.txt',
        'microsoft/deberta-large-mnli': 'https://huggingface.co/microsoft/deberta-large-mnli/resolve/main/merges.txt',
        'microsoft/deberta-xlarge-mnli': (
            'https://huggingface.co/microsoft/deberta-xlarge-mnli/resolve/main/merges.txt'
        ),
    },
}

snake_case			:      Optional[int] 							=   {
    'microsoft/deberta-base': 5_12,
    'microsoft/deberta-large': 5_12,
    'microsoft/deberta-xlarge': 5_12,
    'microsoft/deberta-base-mnli': 5_12,
    'microsoft/deberta-large-mnli': 5_12,
    'microsoft/deberta-xlarge-mnli': 5_12,
}

snake_case			:      Union[str, Any] 							=   {
    'microsoft/deberta-base': {'do_lower_case': False},
    'microsoft/deberta-large': {'do_lower_case': False},
}



class    __lowercase  (       UpperCamelCase							):

							"""simple docstring"""


							SCREAMING_SNAKE_CASE   :					Optional[int]        =						VOCAB_FILES_NAMES
							SCREAMING_SNAKE_CASE   :					List[str]        =						PRETRAINED_VOCAB_FILES_MAP
							SCREAMING_SNAKE_CASE   :					Optional[Any]        =						PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
							SCREAMING_SNAKE_CASE   :					List[Any]        =						["input_ids", "attention_mask", "token_type_ids"]
							SCREAMING_SNAKE_CASE   :					Any        =						DebertaTokenizer





							def __init__(    self				, A_=None				, A_=None				, A_=None				, A_="replace"				, A_="[CLS]"				, A_="[SEP]"				, A_="[SEP]"				, A_="[CLS]"				, A_="[UNK]"				, A_="[PAD]"				, A_="[MASK]"				, A_=False				, **A_				, )->	List[str]:
											super().__init__(
											    A_				, A_				, tokenizer_file=A_				, errors=A_				, bos_token=A_				, eos_token=A_				, unk_token=A_				, sep_token=A_				, cls_token=A_				, pad_token=A_				, mask_token=A_				, add_prefix_space=A_				, **A_				, )
											_SCREAMING_SNAKE_CASE      = kwargs.pop('add_bos_token'				, A_	)

											_SCREAMING_SNAKE_CASE      = json.loads(self.backend_tokenizer.pre_tokenizer.__getstate__()	)
											if pre_tok_state.get('add_prefix_space'				, A_	) != add_prefix_space:
															_SCREAMING_SNAKE_CASE      = getattr(A_				, pre_tok_state.pop('type'	)	)
															_SCREAMING_SNAKE_CASE      = add_prefix_space
															_SCREAMING_SNAKE_CASE      = pre_tok_class(**A_	)

											_SCREAMING_SNAKE_CASE      = add_prefix_space





							@property
							def 		__magic_name__			(    self	)->	str:
											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 		__magic_name__			(    self				, A_	)->	int:
											_SCREAMING_SNAKE_CASE      = AddedToken(A_				, lstrip=A_				, rstrip=A_	) if isinstance(A_				, A_	) else value
											_SCREAMING_SNAKE_CASE      = value





							def 		__magic_name__			(    self				, A_				, A_ = None	)->	List[int]:
											if token_ids_a is None:
															return [self.cls_token_id] + token_ids_a + [self.sep_token_id]
											_SCREAMING_SNAKE_CASE      = [self.cls_token_id]
											_SCREAMING_SNAKE_CASE      = [self.sep_token_id]
											return cls + token_ids_a + sep + token_ids_a + sep





							def 		__magic_name__			(    self				, A_				, A_ = None	)->	List[int]:
											_SCREAMING_SNAKE_CASE      = [self.sep_token_id]
											_SCREAMING_SNAKE_CASE      = [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	) * [0] + len(token_ids_a + sep	) * [1]





							def 		__magic_name__			(    self				, *A_				, **A_	)->	BatchEncoding:
											_SCREAMING_SNAKE_CASE      = kwargs.get('is_split_into_words'				, A_	)
											assert self.add_prefix_space or not is_split_into_words, (
											    F'''You need to instantiate {self.__class__.__name__} with add_prefix_space=True '''
											    "to use it with pretokenized inputs."
											)

											return super()._batch_encode_plus(*A_				, **A_	)





							def 		__magic_name__			(    self				, *A_				, **A_	)->	BatchEncoding:
											_SCREAMING_SNAKE_CASE      = kwargs.get('is_split_into_words'				, A_	)

											assert self.add_prefix_space or not is_split_into_words, (
											    F'''You need to instantiate {self.__class__.__name__} with add_prefix_space=True '''
											    "to use it with pretokenized inputs."
											)

											return super()._encode_plus(*A_				, **A_	)





							def 		__magic_name__			(    self				, A_				, A_ = None	)->	Tuple[str]:
											_SCREAMING_SNAKE_CASE      = self._tokenizer.model.save(A_				, name=A_	)
											return tuple(A_	)





							def 		__magic_name__			(    self				, A_	)->	List[int]:
											_SCREAMING_SNAKE_CASE      = []
											for is_user, text in conversation.iter_texts():
															input_ids.extend(self.encode(A_				, add_special_tokens=A_	) + [self.eos_token_id]	)

											if len(A_	) > self.model_max_length:
															_SCREAMING_SNAKE_CASE      = input_ids[-self.model_max_length :]
											return input_ids
