





from collections import defaultdict







def       lowerCAmelCase__(	lowercase       :    int = 5				) ->    int:
  __snake_case   :				str        =       defaultdict(lowercase				)
  __snake_case   :				Union[str, Any]        =       0

  while True:
    __snake_case   :				Dict        =       get_digits(lowercase				)
    freqs[digits].append(lowercase				)

    if len(freqs[digits]				) == max_base:
      __snake_case   :				Union[str, Any]        =       freqs[digits][0] ** 3
      return base

    num += 1







def       lowerCAmelCase__(	lowercase       :    int				) ->    str:
  return "".join(sorted(str(num**3				)				)				)


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








def       lowerCAmelCase__(	lowercase       :    str				) ->    int:
  __snake_case   :				List[str]        =       str(lowercase				).strip()
  if not oct_string:
    raise ValueError("Empty string was passed to the function"				)
  __snake_case   :				int        =       oct_string[0] == "-"
  if is_negative:
    __snake_case   :				Union[str, Any]        =       oct_string[1:]
  if not oct_string.isdigit() or not all(0 <= int(lowercase				) <= 7 for char in oct_string				):
    raise ValueError("Non-octal value was passed to the function"				)
  __snake_case   :				List[Any]        =       0
  for char in oct_string:
    __snake_case   :				Optional[Any]        =       8 * decimal_number + int(lowercase				)
  if is_negative:
    __snake_case   :				Any        =       -decimal_number
  return decimal_number


if __name__ == "__main__":
     from doctest import testmod

     testmod()

