PROGRAMMING:Lost WLS
WLS lost his way, now need you to help him find the shortest way home.
WLS is now at point 1 and home is at point n.
**Adjacency table, adjacency matrix can solve this problem, SPFA is not card, O (nm) is not card, by conscience**
###Input format:
The first line N and M represent the number of points and the number of edges.
Next, m lines, each line u, V, W, represent an edge with length W from u to V, and the road is bidirectional.
1 $$$Le $$n, m, u, V, w $$$Le $$200 (no double edges, no self rings).
###Output format:
Output WLS the shortest way home, if you can't go home, output - 1, WLS can only sad to go to the Internet bar for a night.
###Input example:
```in
3 2
1 2 1
2 3 3
```
###Output example:
```out
four
```
answer:If there is no answer, please comment
WLS is now at point 1 and home is at point n.
**Adjacency table, adjacency matrix can solve this problem, SPFA is not card, O (nm) is not card, by conscience**
###Input format:
The first line N and M represent the number of points and the number of edges.
Next, m lines, each line u, V, W, represent an edge with length W from u to V, and the road is bidirectional.
1 $$$Le $$n, m, u, V, w $$$Le $$200 (no double edges, no self rings).
###Output format:
Output WLS the shortest way home, if you can't go home, output - 1, WLS can only sad to go to the Internet bar for a night.
###Input example:
```in
3 2
1 2 1
2 3 3
```
###Output example:
```out
four
```
answer:If there is no answer, please comment