#SDNU1224. Tom'problem B

Tom'problem B

Description

Tom is a student in Shan Dong Normal University! his University in the suburbs,this day,Tom wanted to go to the downtown to visit his old friend Jerry,But tom faced a problem ,he want to know how to reach the city center fastest,now the bus stations of city are n[2,100]n[2,100], there are m[1,1000]m[1,1000] bus routes in the city

Tom in the 11st bus station,Jerry in the NNth bus station

Format

Input

The fist line is m,nm,n;

Next mm lines is a,b,ca,b,c (a,ba,b is the name of bus station , cc is the time you cost from station aa to station bb)

Output

The shortest time tom reach city center

Samples

1 2
1 2 10
3 4
1 2 10
2 3 10
3 4 10
10
30