Given a connected, weighted, undirected graph with edge weights , \dfrac{1}{2}, \dfrac{1}{3}, and \dfrac{1}{4}. Find the shortest path from vertex to all others.
The first line contains two integers and (1 \leq n \leq 10^6, 1 \leq m \leq 8 \times 10^5) — the number of vertices and edges in the graph. The edges are given on separate lines. Each edge is given with three integers: , and (1 \leq u, v \leq n, u \leq v, 1 \leq w \leq 4), meaning that there is an undirected edge between and with weight \dfrac{1}{w}.
For each vertex from to , print one number — the length of the shortest path from vertex to it, with at least digits after the decimal point.

Example 1