Undirected graph is given. The weights of its edges can be , , or only. Find the shortest distance from source to destination .
First line contains four integers: number of vertices , number of edges (n, m \leq 10^5), source and destination (1 \leq s, d \leq n). Each of the next lines contains three integers , and describing an undirected edge (, ) with weight (0 \leq w \leq 2).
Print the shortest distance from to .

Example 1