Single Source Shortest Path --------------------------- In this problem, you will have to find the distances from a single node to each other node in a weighted, directed graph. Input ----- The input will consist of multiple instances. The first line of each instance will contain two integers n and m, representing the number of nodes and edges in the graph, respectively. These values will satisfy 1 <= n <= 10000 and 0 <= m <= 1000000. Following this, there will be m lines, each containing three integers i, j and w, where 1 <= i <= n, 1 <= j <= n and w >= 0, indicating that there is an edge from node i to node j with weight w. The end of the input will be indicated by a line with m = n = 0. Output ------ For each input graph, output the distance number of edges in the shortest path from node 1 to each of the other nodes, in the format shown below. If there is no path from node 1 to some other node, output "no path" for that node. Sample Input ------------ 6 16 1 2 9 2 1 9 1 3 3 3 1 3 2 3 4 3 2 4 2 4 1 4 2 1 2 5 3 5 2 3 3 6 2 6 3 2 3 4 2 4 3 2 5 6 5 6 5 5 3 0 0 0 Sample Output ------------- Graph #1 1: 0 2: 6 3: 3 4: 5 5: 9 6: 5 Graph #2 1: 0 2: no path 3: no path