



from collections import defaultdict


def 						UpperCAmelCase__   (   UpperCAmelCase__			:int = 5       ):






 '''simple docstring'''

 a							=		defaultdict(UpperCAmelCase__       )
 a							=		0

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

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

  num += 1


def 						UpperCAmelCase__   (   UpperCAmelCase__			:int       ):






 '''simple docstring'''

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


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


from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxSeqaSeqConfigWithPast
from ...utils import logging


lowerCAmelCase__  	=      logging.get_logger(__name__)

lowerCAmelCase__  	=      {
    "google/long-t5-local-base": "https://huggingface.co/google/long-t5-local-base/blob/main/config.json",
    "google/long-t5-local-large": "https://huggingface.co/google/long-t5-local-large/blob/main/config.json",
    "google/long-t5-tglobal-base": "https://huggingface.co/google/long-t5-tglobal-base/blob/main/config.json",
    "google/long-t5-tglobal-large": "https://huggingface.co/google/long-t5-tglobal-large/blob/main/config.json",
}
class 	_a  (							lowerCamelCase_					):



	"""simple docstring"""



	__SCREAMING_SNAKE_CASE              =					'longt5'
	__SCREAMING_SNAKE_CASE              =					['past_key_values']
	__SCREAMING_SNAKE_CASE              =					{'hidden_size': 'd_model', 'num_attention_heads': 'num_heads', 'num_hidden_layers': 'num_layers'}


	def __init__(   self       ,  lowerCAmelCase_=32128       ,  lowerCAmelCase_=512       ,  lowerCAmelCase_=64       ,  lowerCAmelCase_=2048       ,  lowerCAmelCase_=6       ,  lowerCAmelCase_=None       ,  lowerCAmelCase_=8       ,  lowerCAmelCase_=127       ,  lowerCAmelCase_=16       ,  lowerCAmelCase_=32       ,  lowerCAmelCase_=128       ,  lowerCAmelCase_=0.1       ,  lowerCAmelCase_=1e-6       ,  lowerCAmelCase_=1.0       ,  lowerCAmelCase_="relu"       ,  lowerCAmelCase_=True       ,  lowerCAmelCase_="local"       ,  lowerCAmelCase_=True       ,  lowerCAmelCase_=0       ,  lowerCAmelCase_=1       ,  **lowerCAmelCase_       ,  ):
		_lowercase   =vocab_size
		_lowercase   =d_model
		_lowercase   =d_kv
		_lowercase   =d_ff
		_lowercase   =num_layers
		# default = symmetry
		_lowercase   =num_decoder_layers if num_decoder_layers is not None else self.num_layers
		_lowercase   =num_heads
		_lowercase   =local_radius
		_lowercase   =global_block_size
		_lowercase   =relative_attention_num_buckets
		_lowercase   =relative_attention_max_distance
		_lowercase   =dropout_rate
		_lowercase   =layer_norm_epsilon
		_lowercase   =initializer_factor
		_lowercase   =feed_forward_proj
		_lowercase   =encoder_attention_type
		_lowercase   =use_cache

		_lowercase   =self.feed_forward_proj.split("-"       )
		_lowercase   =act_info[-1]
		_lowercase   =act_info[0] == "gated"

		if len(lowerCAmelCase_       ) > 1 and act_info[0] != "gated" or len(lowerCAmelCase_       ) > 2:
			raise ValueError(
			    F'''`feed_forward_proj`: {feed_forward_proj} is not a valid activation function of the dense layer.'''
			    "Please make sure `feed_forward_proj` is of the format `gated-{ACT_FN}` or `{ACT_FN}`, e.g. "
			    "'gated-gelu' or 'relu'"       )

		# for backwards compatibility
		if feed_forward_proj == "gated-gelu":
			_lowercase   ="gelu_new"

		super().__init__(
		    pad_token_id=lowerCAmelCase_       ,  eos_token_id=lowerCAmelCase_       ,  is_encoder_decoder=lowerCAmelCase_       ,  **lowerCAmelCase_       ,  )

class 	_a  (							lowerCamelCase_					):



	"""simple docstring"""



	@property
	def __lowerCAmelCase      (   self       ):
		_lowercase   ={
		    "input_ids": {0: "batch", 1: "encoder_sequence"},
		    "attention_mask": {0: "batch", 1: "encoder_sequence"},
		}
		if self.use_past:
			_lowercase   ="past_encoder_sequence + sequence"
			_lowercase   ={0: "batch"}
			_lowercase   ={0: "batch", 1: "past_decoder_sequence + sequence"}
		else:
			_lowercase   ={0: "batch", 1: "decoder_sequence"}
			_lowercase   ={0: "batch", 1: "decoder_sequence"}

		if self.use_past:
			self.fill_with_past_key_values_(lowerCAmelCase_       ,  direction="inputs"       )

		return common_inputs


	@property
	def __lowerCAmelCase      (   self       ):
		return 13




