






from collections import OrderedDict
from dataclasses import fields
from typing import Any, Tuple

import numpy as np

from .import_utils import is_torch_available







def 			lowercase__  (				A_:	int		)  ->							Union[str, Any]:







       """simple docstring"""






       if is_torch_available():
              import torch

              if isinstance(A_     ,			torch.Tensor		):
                     return True

       return isinstance(A_     ,			np.ndarray		)





class 							_A (    UpperCamelCase							):
    """simple docstring"""

    def _a       (							self			:    Tuple			)			->       Any:
           __UpperCAmelCase    							=fields(self			)

           # Safety and consistency checks
           if not len(__SCREAMING_SNAKE_CASE			):
                  raise ValueError(f'''{self.__class__.__name__} has no fields.'''			)

           __UpperCAmelCase    							=getattr(self   ,    class_fields[0].name			)
           __UpperCAmelCase    							=all(getattr(self   ,    field.name			) is None for field in class_fields[1:]			)

           if other_fields_are_none and isinstance(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			):
                  for key, value in first_field.items():
                         __UpperCAmelCase    							=value
           else:
                  for field in class_fields:
                         __UpperCAmelCase    							=getattr(self   ,    field.name			)
                         if v is not None:
                                __UpperCAmelCase    							=v



    def __delitem__(							self			:    List[Any]   ,    *__SCREAMING_SNAKE_CASE			:    List[Any]   ,    **__SCREAMING_SNAKE_CASE			:    str			)			->       Tuple:
           raise Exception(f'''You cannot use ``__delitem__`` on a {self.__class__.__name__} instance.'''			)



    def _a       (							self			:    Union[str, Any]   ,    *__SCREAMING_SNAKE_CASE			:    Optional[Any]   ,    **__SCREAMING_SNAKE_CASE			:    Tuple			)			->       Any:
           raise Exception(f'''You cannot use ``setdefault`` on a {self.__class__.__name__} instance.'''			)



    def _a       (							self			:    Optional[Any]   ,    *__SCREAMING_SNAKE_CASE			:    Any   ,    **__SCREAMING_SNAKE_CASE			:    List[str]			)			->       Optional[int]:
           raise Exception(f'''You cannot use ``pop`` on a {self.__class__.__name__} instance.'''			)



    def _a       (							self			:    Dict   ,    *__SCREAMING_SNAKE_CASE			:    Any   ,    **__SCREAMING_SNAKE_CASE			:    Optional[int]			)			->       int:
           raise Exception(f'''You cannot use ``update`` on a {self.__class__.__name__} instance.'''			)



    def __getitem__(							self			:    List[Any]   ,    __SCREAMING_SNAKE_CASE			:    int			)			->       Optional[int]:
           if isinstance(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			):
                  __UpperCAmelCase    							=dict(self.items()			)
                  return inner_dict[k]
           else:
                  return self.to_tuple()[k]



    def __setattr__(							self			:    Tuple   ,    __SCREAMING_SNAKE_CASE			:    Optional[Any]   ,    __SCREAMING_SNAKE_CASE			:    Optional[Any]			)			->       Optional[int]:
           if name in self.keys() and value is not None:
                  # Don't call self.__setitem__ to avoid recursion errors
                  super().__setitem__(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			)
           super().__setattr__(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			)



    def __setitem__(							self			:    Optional[int]   ,    __SCREAMING_SNAKE_CASE			:    Any   ,    __SCREAMING_SNAKE_CASE			:    int			)			->       List[Any]:
           # Will raise a KeyException if needed
           super().__setitem__(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			)
           # Don't call self.__setattr__ to avoid recursion errors
           super().__setattr__(__SCREAMING_SNAKE_CASE   ,    __SCREAMING_SNAKE_CASE			)



    def _a       (							self			:    Union[str, Any]			)			->       Tuple[Any]:
           return tuple(self[k] for k in self.keys()			)












from collections import defaultdict







def 			lowercase__  (				A_:	int = 5		)  ->							int:







       """simple docstring"""






       __UpperCAmelCase    							=defaultdict(A_		)
       __UpperCAmelCase    							=0

       while True:
              __UpperCAmelCase    							=get_digits(A_		)
              freqs[digits].append(A_		)

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

              num += 1







def 			lowercase__  (				A_:	int		)  ->							str:







       """simple docstring"""






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


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




