To improve her mathematical knowledge, Bessie has been taking a graph theory course and finds herself stumped by the following problem. Please help her!
You are given a connected, undirected graph with vertices labeled $1\dots N$ and edges labeled $1\dots M$ ($2\le N\le 2\cdot 10^5$, $N-1\le M\le 4\cdot 10^5$). For each vertex $v$ in the graph, the following process is conducted:
Let $S=\{v\}$ and $h=0$.
While $|S|<N$,
Return $h\pmod{10^9+7}$.
Determine all the return values of this process.
The first line contains $N$ and $M$. Then follow $M$ lines, the $e$th containing the endpoints $(a_e,b_e)$ of the $e$th edge ($1\le a_e<b_e\le N$). It is guaranteed that these edges form a connected graph, and at most one edge connects each pair of vertices.
Output $N$ lines, where the $i$th line should contain the return value of the process starting at vertex $i$.