We have a tree with N vertices numbered 1 to N. The i-th edge in this tree connects Vertex a_i and b_i. For each k=1, ..., N, solve the problem below:

* Consider writing a number on each vertex in the tree in the following manner:
* First, write 1 on Vertex k.
* Then, for each of the numbers 2, ..., N in this order, write the number on the vertex chosen as follows:
* Choose a vertex that still does not have a number written on it and is adjacent to a vertex with a number already written on it. If there are multiple such vertices, choose one of them at random.
* Find the number of ways in which we can write the numbers on the vertices, modulo (10^9+7).

Constraints

* 2 \leq N \leq 2 \times 10^5
* 1 \leq a_i,b_i \leq N
* The given graph is a tree.

Input

Input is given from Standard Input in the following format:


N
a_1 b_1
:
a_{N-1} b_{N-1}


Output

For each k=1, 2, ..., N in this order, print a line containing the answer to the problem.

Examples

Input

3
1 2
1 3


Output

2
1
1


Input

2
1 2


Output

1
1


Input

5
1 2
2 3
3 4
3 5


Output

2
8
12
3
3


Input

8
1 2
2 3
3 4
3 5
3 6
6 7
6 8


Output

40
280
840
120
120
504
72
72
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Queue;

public class Main {
	static int n;
	static List<List<Integer>> list;
	static Kaijou kai;
	static int mod = 1000000007;
	static Map<Integer, Map<Integer, Node>> map;

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] sa = br.readLine().split(" ");
		n = Integer.parseInt(sa[0]);
		list = new ArrayList<>(n);
		for (int i = 0; i < n; i++) {
			list.add(new ArrayList<>());
		}
		for (int i = 0; i < n - 1; i++) {
			sa = br.readLine().split(" ");
			int a = Integer.parseInt(sa[0]) - 1;
			int b = Integer.parseInt(sa[1]) - 1;
			list.get(a).add(b);
			list.get(b).add(a);
		}
		br.close();

		kai = new Kaijou(200000, mod);
		map = new HashMap<>();
		dfs(0, -1);

		Queue<Node2> que = new ArrayDeque<>();
		que.add(new Node2(0, -1));
		while (!que.isEmpty()) {
			Node2 cur = que.poll();
			Node total = map.get(cur.x).get(-1);
			if (total == null) {
				Node base = map.get(cur.x).get(cur.p);
				long val = base.val;
				val *= kai.p[n - 1];
				val %= mod;
				val *= kai.pi[base.num - 1];
				val %= mod;

				Node add = map.get(cur.p).get(cur.x);
				val *= kai.pi[add.num];
				val %= mod;
				val *= add.val;
				val %= mod;

				total = new Node(n, val);
				map.get(cur.x).put(-1, total);
			}
			for (int c : list.get(cur.x)) {
				if (c != cur.p) {
					que.add(new Node2(c, cur.x));

					Node rem = map.get(c).get(cur.x);
					long val = total.val;
					val *= kai.pi[n - 1];
					val %= mod;
					val *= kai.p[n - 1 - rem.num];
					val %= mod;

					val *= kai.p[rem.num];
					val %= mod;
					val = divide(val, rem.val, mod);

					Node o = new Node(n - rem.num, val);
					map.get(cur.x).put(c, o);
				}
			}
		}

		PrintWriter pw = new PrintWriter(System.out);
		for (int i = 0; i < n; i++) {
			pw.println(map.get(i).get(-1).val);
		}
		pw.flush();
	}

	static Node dfs(int x, int p) {
		List<Node> list2 = new ArrayList<>();
		for (int c : list.get(x)) {
			if (c != p) {
				list2.add(dfs(c, x));
			}
		}
		int sum = 0;
		for (Node o : list2) {
			sum += o.num;
		}
		long val = kai.p[sum];
		for (Node o : list2) {
			val *= kai.pi[o.num];
			val %= mod;
			val *= o.val;
			val %= mod;
		}
		Node o = new Node(sum + 1, val);
		Map<Integer, Node> map2 = map.get(x);
		if (map2 == null) {
			map2 = new HashMap<>();
			map.put(x, map2);
		}
		map2.put(p, o);
		return o;
	}

	static class Node {
		int num;
		long val;

		public Node(int num, long val) {
			this.num = num;
			this.val = val;
		}
	}

	static class Node2 {
		int x, p;

		public Node2(int x, int p) {
			this.x = x;
			this.p = p;
		}
	}

	static long divide(long a, long b, int m) {
		BigInteger ba = BigInteger.valueOf(a);
		BigInteger bm = BigInteger.valueOf(m);
		BigInteger bb = BigInteger.valueOf(b).modInverse(bm);
		return ba.multiply(bb).mod(bm).longValue();
	}

	static class Kaijou {
		long[] p, pi;
		int m;

		public Kaijou(int n, int mod) {
			n++;
			m = mod;
			p = new long[n];
			pi = new long[n];
			p[0] = 1;
			pi[0] = 1;
			for (int i = 1; i < n; i++) {
				p[i] = p[i - 1] * i % m;
			}
			pi[n - 1] = BigInteger.valueOf(p[n - 1])
					.modInverse(BigInteger.valueOf(m)).longValue();
			for (int i = n - 1; i > 1; i--) {
				pi[i - 1] = pi[i] * i % m;
			}
		}
	}
}
