






"""simple docstring"""





def     A(  snake_case_						,       snake_case_		):
							"""simple docstring"""





							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(  snake_case_						,       snake_case_						,       snake_case_		):
							"""simple docstring"""





							lowercase__:    str        =      float("inf"		)
							lowercase__:    Optional[int]        =      -1
							for i in range(_A		):
														if (not vset[i]) and mdist[i] < min_val:
																					lowercase__:    Any        =      i
																					lowercase__:    Union[str, Any]        =      mdist[i]
							return min_ind






def     A(  snake_case_						,       snake_case_						,       snake_case_		):
							"""simple docstring"""





							lowercase__:    List[Any]        =      [float("inf"		) for _ in range(_A		)]
							lowercase__:    Optional[Any]        =      [False for _ in range(_A		)]
							lowercase__:    Optional[int]        =      0.0

							for _ in range(v - 1		):
														lowercase__:    str        =      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__:    int        =      mdist[u] + graph[u][i]

							print_dist(_A						,       _A		)


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

		UpperCamelCase			=      [[float("""inf""") for i in range(V)] for j in range(V)]

		for i in range(V):
				UpperCamelCase			=      0.0

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

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














"""simple docstring"""





def     A(  snake_case_						,       snake_case_		):
       """simple docstring"""





       assert isinstance(snake_case_						,       snake_case_		), F"""The input value of [set_a={set_a}] is not a set"""
       assert isinstance(snake_case_						,       snake_case_		), F"""The input value of [set_b={set_b}] is not a set"""

       return {a + b for a in set_a for b in set_b}


if __name__ == "__main__":
  from doctest import testmod

  testmod()






