NC222488. [USACOOpen2020P]Circus
描述
输入描述
Line 1 contains N.
Lines 2≤i≤N each contain two integers ai and bi denoting an edge between ai and bi in the tree.
输出描述
For each 1≤i≤N, the i-th line of output should contain the answer for K=i modulo 109+7.
示例1
输入:
5 1 2 2 3 3 4 3 5
输出:
1 1 3 24 120
说明:
For K=1 and K=2, any two states can be transformed into one another.