


'''simple docstring'''


from __future__ import annotations

import math
from itertools import permutations


def 		_lowercase   (SCREAMING_SNAKE_CASE       ):




     '''simple docstring'''





     if 1 < number < 4:
          # 2 and 3 are primes
          return True
     elif number < 2 or number % 2 == 0 or number % 3 == 0:
          # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
          return False

     # All primes number are in format of 6k +/- 1
     for i in range(5					,				int(math.sqrt(SCREAMING_SNAKE_CASE       ) + 1       )					,				6       ):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True


def 		_lowercase   (SCREAMING_SNAKE_CASE = 7       ):




     '''simple docstring'''





     __A  :					Optional[Any]						     =       "".join(str(SCREAMING_SNAKE_CASE       ) for i in range(1					,				n + 1       )       )
     __A  :					Dict						     =       [int("".join(SCREAMING_SNAKE_CASE       )       ) for i in permutations(SCREAMING_SNAKE_CASE					,				SCREAMING_SNAKE_CASE       )]
     __A  :					Tuple						     =       [num for num in perm_list if is_prime(SCREAMING_SNAKE_CASE       )]
     return max(SCREAMING_SNAKE_CASE       ) if pandigitals else 0


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





'''simple docstring'''


from collections import defaultdict


def 		_lowercase   (SCREAMING_SNAKE_CASE = 5       ):




     '''simple docstring'''





     __A  :					int						     =       defaultdict(SCREAMING_SNAKE_CASE       )
     __A  :					Optional[Any]						     =       0

     while True:
          __A  :					List[str]						     =       get_digits(SCREAMING_SNAKE_CASE       )
          freqs[digits].append(SCREAMING_SNAKE_CASE       )

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

          num += 1


def 		_lowercase   (SCREAMING_SNAKE_CASE       ):




     '''simple docstring'''





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


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

