PROGRAMMING:critical path
Suppose that a project consists of several subtasks. An AOE net with n vertices and e edges is used to represent the project. The vertices are numbered from 1 to N. the directed edges represent each subtask of the project. The weight of the edges represents the time required to complete the subtask. Suppose that the net contains only one source point and one sink point. Please write a program to find out all the key activities of the project, and calculate the shortest time to complete the project.
###Input format:
Each test point contains multiple sets of test data. The first line of each group of data contains two integers n and E, both of which are no more than 200, representing the number of vertices and sides of AOE net respectively. Next, line e represents the information of each edge, and each line has three positive integers a, B, and C, where a and B represent the endpoint number of the edge, and C represents the weight. The edges are not necessarily arranged in the end number order, and the vertices are not necessarily arranged in the topological order.
###Output format:
For each group of data, if the project is not feasible (there is a ring in AOE network), output "unworkable project"; If the project is feasible, the shortest time required for the first line to complete the project is output, and the key activities are output from the second line. Each key activity occupies one line, and the format is I - > J, where I and j represent the endpoint number of the side where the key activity is located. The output order of each key activity is: output in the increasing order of I, if the I value of multiple key activities is the same, output in the increasing order of J.
###Input example:
```in
4 4
1 2 6
1 3 4
2 4 1
3 4 1
```
###Output example:
```out
seven
1->2
2->4
```
answer:If there is no answer, please comment
###Input format:
Each test point contains multiple sets of test data. The first line of each group of data contains two integers n and E, both of which are no more than 200, representing the number of vertices and sides of AOE net respectively. Next, line e represents the information of each edge, and each line has three positive integers a, B, and C, where a and B represent the endpoint number of the edge, and C represents the weight. The edges are not necessarily arranged in the end number order, and the vertices are not necessarily arranged in the topological order.
###Output format:
For each group of data, if the project is not feasible (there is a ring in AOE network), output "unworkable project"; If the project is feasible, the shortest time required for the first line to complete the project is output, and the key activities are output from the second line. Each key activity occupies one line, and the format is I - > J, where I and j represent the endpoint number of the side where the key activity is located. The output order of each key activity is: output in the increasing order of I, if the I value of multiple key activities is the same, output in the increasing order of J.
###Input example:
```in
4 4
1 2 6
1 3 4
2 4 1
3 4 1
```
###Output example:
```out
seven
1->2
2->4
```
answer:If there is no answer, please comment