409934: GYM103860 D Tree Partition
Description
You are given a tree of $$$n$$$ vertices, indexed in $$$1$$$ to $$$n$$$. Note that by deleting $$$x-1$$$ edges, the tree will become $$$x$$$ connected components.
It is required that after deleting edges, for each component, the set of indexes value in it is a continuous interval. That is, denoting the minimum and maximum value of the index value of the component as $$$l$$$ and $$$r$$$, every vertice indexed in $$$[l,r]$$$ should belong to the same component.
Now for $$$x=1,2,\dots,k$$$, you need to compute the number of ways to delete edges. Two ways are different if at least one edge is deleted in one of them and preserved in the other. You only need to compute the answer modulo $$$998244353$$$.
InputThe first line has two integers $$$n$$$ ($$$1 \leq n \leq 2 \cdot 10^5$$$) and $$$k$$$ ($$$1 \leq k \leq \min(n, 400)$$$).
In the following $$$n-1$$$ lines, there are two integers $$$x,y$$$ ($$$1 \leq x, y \leq n, x \ne y$$$) in each line, indicating an edge $$$(x,y)$$$.
OutputOutput $$$k$$$ lines, each line with an integer, indicating the answer modulo $$$998244353$$$.
ExamplesInput4 3 1 2 2 3 2 4Output
1 2 2Input
7 7 2 5 3 6 4 5 5 1 1 6 6 7Output
1 1 0 0 1 2 1