




'''simple docstring'''






from collections import defaultdict






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE = 5		)						->      int:
      snake_case__					:      Optional[Any]  			=						defaultdict(__SCREAMING_SNAKE_CASE		)
      snake_case__					:      int  			=						0

      while True:
            snake_case__					:      str  			=						get_digits(__SCREAMING_SNAKE_CASE		)
            freqs[digits].append(__SCREAMING_SNAKE_CASE		)

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

            num += 1






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE		)						->      str:
      return "".join(sorted(str(num**3		)		)		)


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






'''simple docstring'''






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE = 1000		)						->      int:
      snake_case__					:      List[str]  			=						0
      snake_case__					:      int  			=						(n - 1) // 3
      total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
      snake_case__					:      Optional[Any]  			=						(n - 1) // 5
      total += ((terms) * (10 + (terms - 1) * 5)) // 2
      snake_case__					:      Tuple  			=						(n - 1) // 15
      total -= ((terms) * (30 + (terms - 1) * 15)) // 2
      return total


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