




from __future__ import annotations





class  lowerCamelCase_							:


 '''simple docstring'''







 def __init__(							self						:	str       ,       _lowerCAmelCase						:	int		):
       SCREAMING_SNAKE_CASE_					=    vertices
       SCREAMING_SNAKE_CASE_					=    [[0] * vertices for _ in range(_lowerCAmelCase		)]



 def    lowerCAmelCase_						(							self						:	Any       ,       _lowerCAmelCase						:	list[int]		):
       print('Vertex \t Distance from Source'		)
       for vertex in range(self.vertices		):
             print(_lowerCAmelCase       ,       '\t\t'       ,       distances_from_source[vertex]		)



 def    lowerCAmelCase_						(							self						:	str       ,       _lowerCAmelCase						:	list[int]       ,       _lowerCAmelCase						:	list[bool]		):
       SCREAMING_SNAKE_CASE_					=    1E7
       SCREAMING_SNAKE_CASE_					=    0

       # Search not nearest vertex not in the shortest path tree
       for vertex in range(self.vertices		):
             if distances_from_source[vertex] < minimum and visited[vertex] is False:
                   SCREAMING_SNAKE_CASE_					=    distances_from_source[vertex]
                   SCREAMING_SNAKE_CASE_					=    vertex
       return min_index




 def    lowerCAmelCase_						(							self						:	Union[str, Any]       ,       _lowerCAmelCase						:	int		):
       SCREAMING_SNAKE_CASE_					=    [int(1E7		)] * self.vertices  # distances from the source
       SCREAMING_SNAKE_CASE_					=    0
       SCREAMING_SNAKE_CASE_					=    [False] * self.vertices

       for _ in range(self.vertices		):
             SCREAMING_SNAKE_CASE_					=    self.minimum_distance(_lowerCAmelCase       ,       _lowerCAmelCase		)
             SCREAMING_SNAKE_CASE_					=    True

             # Update dist value of the adjacent vertices
             # of the picked vertex only if the current
             # distance is greater than new distance and
             # the vertex in not in the shortest path tree
             for v in range(self.vertices		):
                   if (
                       self.graph[u][v] > 0
                       and visited[v] is False
                       and distances[v] > distances[u] + self.graph[u][v]
                   ):
                         SCREAMING_SNAKE_CASE_					=    distances[u] + self.graph[u][v]

       self.print_solution(_lowerCAmelCase		)


if __name__ == "__main__":
   lowerCamelCase__				:     List[str]			       =							Graph(9)
   lowerCamelCase__				:     Tuple			       =							[
       [0, 4, 0, 0, 0, 0, 0, 8, 0],
       [4, 0, 8, 0, 0, 0, 0, 11, 0],
       [0, 8, 0, 7, 0, 4, 0, 0, 2],
       [0, 0, 7, 0, 9, 14, 0, 0, 0],
       [0, 0, 0, 9, 0, 10, 0, 0, 0],
       [0, 0, 4, 14, 10, 0, 2, 0, 0],
       [0, 0, 0, 0, 0, 2, 0, 1, 6],
       [8, 11, 0, 0, 0, 0, 1, 0, 7],
       [0, 0, 2, 0, 0, 0, 6, 7, 0],
   ]
   graph.dijkstra(0)





from collections import defaultdict

def       UpperCAmelCase_							(   __UpperCAmelCase		:			int = 5							)      ->				int:
      SCREAMING_SNAKE_CASE_					=    defaultdict(__UpperCAmelCase							)
      SCREAMING_SNAKE_CASE_					=    0

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

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

            num += 1

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


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