






def    a__    (	A		,					A       ):
   print("""\nVertex Distance"""       )
   for i in range(A       ):
      if dist[i] != float("""inf"""       ):
         print(A		,					"""\t"""		,					int(dist[i]       )		,					end="""\t"""       )
      else:
         print(A		,					"""\t"""		,					"""INF"""		,					end="""\t"""       )
      print()
def    a__    (	A		,					A		,					A       ):
   lowercase__    :						Union[str, Any]       =			float("""inf"""       )
   lowercase__    :						Tuple       =			-1
   for i in range(A       ):
      if (not vset[i]) and mdist[i] < min_val:
         lowercase__    :						Optional[int]       =			i
         lowercase__    :						Optional[Any]       =			mdist[i]
   return min_ind
def    a__    (	A		,					A		,					A       ):
   lowercase__    :						Optional[Any]       =			[float("""inf"""       ) for _ in range(A       )]
   lowercase__    :						str       =			[False for _ in range(A       )]
   lowercase__    :						Optional[int]       =			0.0

   for _ in range(v - 1       ):
      lowercase__    :						Union[str, Any]       =			min_dist(A		,					A		,					A       )
      lowercase__    :						Optional[int]       =			True

      for i in range(A       ):
         if (
             (not vset[i])
             and graph[u][i] != float("""inf"""       )
             and mdist[u] + graph[u][i] < mdist[i]
         ):
            lowercase__    :						List[Any]       =			mdist[u] + graph[u][i]

   print_dist(A		,					A       )


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)










def    a__    (	A       ):
   return int(A       ) if x - int(A       ) >= 0 else int(A       ) - 1


if __name__ == "__main__":
 import doctest

 doctest.testmod()


