Values on a Tree

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

You are given a tree with nn vertices. The length of each edge is exactly 1. For any non-empty subset SS of the vertices, value(S)\mathit{value} (S) is equal to the maximum of dis(u,v)\mathit{dis} (u, v) over all pairs (u,v)S(u, v) \in S, where dis(u,v)\mathit{dis} (u, v) is equal to the distance between uu and vv in the tree.

It is easy to find that value(S)\mathit{value} (S) satisfies 0value(S)<n0 \le \mathit{value} (S) < n. For each 0Kn10 \le K \le n - 1, print the number of the subsets SS such that value(S)=K\mathit{value} (S) = K.

입력

The first line of input contains an integer nn (1n30001 \le n \le 3000), the number of vertices in the graph. Then n1n - 1 lines follow. Each of them contains two integers uu and vv which mean that there is an edge between uu and vv (1u,vn1 \le u, v \le n). It is guaranteed that the given graph is a tree.

출력

Print a line containing exactly nn integers. The ii-th integer must be the number of non-empty subsets SS which satisfy value(S)=i1\mathit{value} (S) = i - 1. The answers may be very large, so print each answer modulo 998,244,353998\\,244\\,353.