Widest Paths ------------ Veronica Lishincorse is a terrible driver. When she drives on narrow roads, she often drives into the ditch. So, when she wants to drive somewhere, she is not interested in the shortest path; instead, she wants the widest path. In this problem, you will help Veronica reprogramme her GPS to find the widest path to her destination instead of the shortest path. The city in which Veronica lives will be modelled as a graph. Intersections are nodes and segments of streets going from one intersection to another are modelled as the edges of the graph. Some streets are one-way streets, so it will be a directed graph. Each street segment has an associated width. The width of a path is the width of the narrowest street along the path. Input ----- The input consists 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. (The end of the input will be indicated by a line with m = n = 0.) The number of nodes will be at most 300. 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 width w. Next, there will be a sequence of queries. Each query will be on a separate line. It will give a pair of nodes i and j (where 1 <= i <= n and 1 <= j <= n and i is different from j). Output ------ For each input instance and for each query within that instance, output the width of the widest path in the format shown in the sample output below. Sample Input ------------ 4 5 3 1 4 3 2 7 1 2 2 1 4 5 2 4 3 3 4 1 4 4 2 0 0 3 3 1 2 5 1 3 3 2 3 4 1 3 0 0 0 0 Sample Output ------------- Graph #1 The widest path from 3 to 4 has width 4 The widest path from 1 to 4 has width 5 There is no path from 4 to 2 Graph #2 The widest path from 1 to 3 has width 4