


def   snake_case_	(    snake_case     ,				snake_case	)    ->							Any:
       print('\nVertex Distance'	)
       for i in range(snake_case	):
              if dist[i] != float('inf'	):
                     print(snake_case     ,				'\t'     ,				int(dist[i]	)     ,				end='\t'	)
              else:
                     print(snake_case     ,				'\t'     ,				'INF'     ,				end='\t'	)
              print()




def   snake_case_	(    snake_case     ,				snake_case     ,				snake_case	)    ->							List[str]:
       lowercase__:  Any         =  float('inf'	)
       lowercase__:  List[Any]         =  -1
       for i in range(snake_case	):
              if (not vset[i]) and mdist[i] < min_val:
                     lowercase__:  Optional[int]         =  i
                     lowercase__:  Union[str, Any]         =  mdist[i]
       return min_ind




def   snake_case_	(    snake_case     ,				snake_case     ,				snake_case	)    ->							int:
       lowercase__:  str         =  [float('inf'	) for _ in range(snake_case	)]
       lowercase__:  Optional[int]         =  [False for _ in range(snake_case	)]
       lowercase__:  Tuple         =  0.0

       for _ in range(v - 1	):
              lowercase__:  Dict         =  min_dist(snake_case     ,				snake_case     ,				snake_case	)
              lowercase__:  Optional[Any]         =  True

              for i in range(snake_case	):
                     if (
                         (not vset[i])
                         and graph[u][i] != float('inf'	)
                         and mdist[u] + graph[u][i] < mdist[i]
                     ):
                            lowercase__:  Union[str, Any]         =  mdist[u] + graph[u][i]

       print_dist(snake_case     ,				snake_case	)


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

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

 for i in range(V):
  __lowerCAmelCase									=				0.0

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

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






from typing import Callable




def   snake_case_	(    snake_case	)    ->							Tuple:

       def wrapper(snake_case	):
              lowercase__:  Tuple         =  function_with_docstring.__doc__
              return target_function

       return wrapper


