'''simple docstring'''




def _UpperCamelCase (							SCREAMING_SNAKE_CASE_	,							SCREAMING_SNAKE_CASE_				):
     print('\nVertex Distance'				)
     for i in range(SCREAMING_SNAKE_CASE_				):
          if dist[i] != float('inf'				):
               print(SCREAMING_SNAKE_CASE_	,							'\t'	,							int(dist[i]				)	,							end='\t'				)
          else:
               print(SCREAMING_SNAKE_CASE_	,							'\t'	,							'INF'	,							end='\t'				)
          print()

def _UpperCamelCase (							SCREAMING_SNAKE_CASE_	,							SCREAMING_SNAKE_CASE_	,							SCREAMING_SNAKE_CASE_				):
     lowercase_       :							Any  					=       float('inf'				)
     lowercase_       :							int  					=       -1
     for i in range(SCREAMING_SNAKE_CASE_				):
          if (not vset[i]) and mdist[i] < min_val:
               lowercase_       :							str  					=       i
               lowercase_       :							List[Any]  					=       mdist[i]
     return min_ind

def _UpperCamelCase (							SCREAMING_SNAKE_CASE_	,							SCREAMING_SNAKE_CASE_	,							SCREAMING_SNAKE_CASE_				):
     lowercase_       :							Dict  					=       [float('inf'				) for _ in range(SCREAMING_SNAKE_CASE_				)]
     lowercase_       :							Optional[Any]  					=       [False for _ in range(SCREAMING_SNAKE_CASE_				)]
     lowercase_       :							Optional[int]  					=       0.0

     for _ in range(v - 1				):
          lowercase_       :							Any  					=       min_dist(SCREAMING_SNAKE_CASE_	,							SCREAMING_SNAKE_CASE_	,							SCREAMING_SNAKE_CASE_				)
          lowercase_       :							Dict  					=       True

          for i in range(SCREAMING_SNAKE_CASE_				):
               if (
                   (not vset[i])
                   and graph[u][i] != float('inf'				)
                   and mdist[u] + graph[u][i] < mdist[i]
               ):
                    lowercase_       :							List[str]  					=       mdist[u] + graph[u][i]

     print_dist(SCREAMING_SNAKE_CASE_	,							SCREAMING_SNAKE_CASE_				)


if __name__ == "__main__":
 _A										= int(input('Enter number of vertices: ').strip())
 _A										= int(input('Enter number of edges: ').strip())

 _A										= [[float('inf') for i in range(V)] for j in range(V)]

 for i in range(V):
  _A										= 0.0

 for i in range(E):
  print('\nEdge ', i + 1)
  _A										= int(input('Enter source:').strip())
  _A										= int(input('Enter destination:').strip())
  _A										= float(input('Enter weight:').strip())
  _A										= weight

 _A										= int(input('\nEnter shortest path source:').strip())
 dijkstra(graph, V, gsrc)





'''simple docstring'''




def _UpperCamelCase (							SCREAMING_SNAKE_CASE_				):
     return " ".join([word[::-1] for word in input_str.split()]				)


if __name__ == "__main__":
 import doctest

 doctest.testmod()




