PROGRAMMING:Special minimum cost road construction
At present, there are some roads connecting n towns, but the roads are in disrepair. Now the government is going to transform some of the earth roads into standard roads, hoping that the standard roads can connect all the towns and minimize the total cost * *, but one of the towns is relatively special. Due to the terrain and other restrictions, at most two standard roads can pass through the town * *. Please write a program to find out a transformation scheme that meets the above conditions and has the minimum total cost. If there is no transformation scheme, it can also be identified. Suppose the road is two-way.
###Input format:
The input contains multiple sets of data. The first row of each group of data is three integers n, V and E, all of which are no more than 50. N is the number of cities and towns, and the number of cities and towns is 0 to n-1. V is the town number with the best two standard roads, e is the number of existing dirt roads, and the next row is e, which represents each road information. Each row contains three non negative integers a, B, C, which represents the existing road between town a and town B. if it is transformed into a standard road, the cost is C.
###Output format:
Output a line for each group of data, which is an integer, indicating the minimum cost to meet the requirements. If there is no transformation scheme, output - 1.
###Input example:
```in
5 0 8
0 1 1
0 2 1
0 3 1
0 4 1
1 4 100
1 2 100
2 3 100
3 4 100
5 0 4
0 1 1
0 2 1
0 3 1
0 4 1
```
###Output example:
```out
two hundred and two
-1
```
answer:If there is no answer, please comment
###Input format:
The input contains multiple sets of data. The first row of each group of data is three integers n, V and E, all of which are no more than 50. N is the number of cities and towns, and the number of cities and towns is 0 to n-1. V is the town number with the best two standard roads, e is the number of existing dirt roads, and the next row is e, which represents each road information. Each row contains three non negative integers a, B, C, which represents the existing road between town a and town B. if it is transformed into a standard road, the cost is C.
###Output format:
Output a line for each group of data, which is an integer, indicating the minimum cost to meet the requirements. If there is no transformation scheme, output - 1.
###Input example:
```in
5 0 8
0 1 1
0 2 1
0 3 1
0 4 1
1 4 100
1 2 100
2 3 100
3 4 100
5 0 4
0 1 1
0 2 1
0 3 1
0 4 1
```
###Output example:
```out
two hundred and two
-1
```
answer:If there is no answer, please comment