Undirected graph is given. The weights of its edges can be 0 or 1 only. Find the shortest distance from source s to destination d.
The first line contains four integers: number of vertices n, number of edges m(n,m≤105), source s and destination d(1≤s,d≤n). Each of the next m lines contains three integers a,b and w describing an undirected edge (a,b) with integer weight w(0≤w≤1).
Print the shortest distance from s to d.