IOI
Find a path that meets the following criteria:
The path is a sequence of distinct cities , , ..., , where there is a direct road connecting each pair of consecutive cities.
The total length of this path must be exactly .
Your task is to select such a sequence of cities that minimizes .
Input Format
The first line contains two integers and (, ) — representing the number of cities and the required path length, respectively.
Each of the following lines contains three integers , , and (), indicating there is a road of length between cities and .
Output Format
Print the minimal , or if no such path exists.
Examples
Note
In the first example, you can select the sequence of cities .
In the second example, it is not possible to find such a path.
In the third example, you can choose the sequence .