Problem:
Score : 1900 points

Problem Statement

#nck {
width: 30px;
height: auto;
}

One day, Takahashi was given the following problem from Aoki:

You are given a tree with N vertices and an integer K. The vertices are numbered 1 through N. The edges are represented by pairs of integers (a_i, b_i).

For a set S of vertices in the tree, let f(S) be the minimum number of the vertices in a subtree of the given tree that contains all vertices in S.

There are ways to choose K vertices from the trees. For each of them, let S be the set of the chosen vertices, and find the sum of f(S) over all ways.

Since the answer may be extremely large, print it modulo 924844033(prime).

Since it was too easy for him, he decided to solve this problem for all K = 1,2,...,N.

Constraints

2 ≦ N ≦ 200,000

1 ≦ a_i, b_i ≦ N

The given graph is a tree.

Input

The input is given from Standard Input in the following format:

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

Output

Print N lines. The i-th line should contain the answer to the problem where K=i, modulo 924844033.

Sample Input 1

3
1 2
2 3

Sample Output 1

3
7
3

The diagram above illustrates the case where K=2. The chosen vertices are colored pink, and the subtrees with the minimum number of vertices are enclosed by red lines.

Sample Input 2

4
1 2
1 3
1 4

Sample Output 2

4
15
13
4

Sample Input 3

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

Sample Output 3

7
67
150
179
122
45
7

Solution in C++ (GCC 9.2.1) (judge verdict: Accepted)

// ===================================
//   author: M_sea
//   website: http://m-sea-blog.com/
// ===================================
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cmath>
#define register
using namespace std;

inline int read()
{
	int X=0,w=1; char c=getchar();
	while(c<'0'||c>'9') {if(c=='-') w=-1; c=getchar();}
	while(c>='0'&&c<='9') X=X*10+c-'0',c=getchar();
	return X*w;
}

const int MAXN=600000+10;
const int mod=924844033;
inline int qpow(int a,int b)
{
	int c=1;
	for(; b; b>>=1,a=1ll*a*a%mod) if(b&1) c=1ll*c*a%mod;
	return c;
}
int fac[MAXN],ifac[MAXN];
int cnt[MAXN],sz[MAXN];
int rev[MAXN],f[MAXN],g[MAXN];
int n;

struct edge {int v,nxt;} e[MAXN<<1];
int head[MAXN];
inline void addEdge(int u,int v)
{
	static int c=0;
	e[++c]=(edge) {v,head[u]},head[u]=c;
}


inline void init(int n)
{
	fac[0]=1;
	for(int i=1; i<=n; ++i) fac[i]=1ll*fac[i-1]*i%mod;
	ifac[n]=qpow(fac[n],mod-2);
	for(int i=n; i; --i) ifac[i-1]=1ll*ifac[i]*i%mod;
}

inline int C(int n,int m)
{return 1ll*fac[n]*ifac[m]%mod*ifac[n-m]%mod;}


inline void dfs(int u,int fa)
{
	sz[u]=1;
	for(int i=head[u]; i; i=e[i].nxt)
	{
		int v=e[i].v; if(v==fa) continue;
		dfs(v,u),sz[u]+=sz[v],++cnt[sz[v]];
	}
	++cnt[n-sz[u]];
}

inline void ntt(int *a,int n,int op)
{
	for(int i=0; i<n; ++i) if(i<rev[i]) swap(a[i],a[rev[i]]);
	for(int i=1; i<n; i<<=1)
	{
		int rot=qpow(op==1?5:554906420,(mod-1)/(i<<1));
		for(int j=0; j<n; j+=i<<1)
			for(int k=0,w=1; k<i; ++k,w=1ll*w*rot%mod)
			{
				int x=a[j+k],y=1ll*w*a[j+k+i]%mod;
				a[j+k]=(x+y)%mod,a[j+k+i]=(x-y+mod)%mod;
			}
	}
	if(op==-1)
	{
		int inv=qpow(n,mod-2);
		for(int i=0; i<n; ++i) a[i]=1ll*a[i]*inv%mod;
	}
}

int main()
{
	n=read();
	for(int i=1; i<n; ++i)
	{
		int u=read(),v=read();
		addEdge(u,v),addEdge(v,u);
	}
	dfs(1,0); init(n);
	for(int i=1; i<=n; ++i) f[i]=1ll*cnt[i]*fac[i]%mod;
	reverse(f,f+n+1);
	for(int i=0; i<=n; ++i) g[i]=ifac[i];
	int lim=1,l=0;
	for(; lim<=n<<1; lim<<=1,++l);
	for(int i=0; i<lim; ++i) rev[i]=(rev[i>>1]>>1)|((i&1)<<(l-1));
	ntt(f,lim,1),ntt(g,lim,1);
	for(int i=0; i<lim; ++i) f[i]=1ll*f[i]*g[i]%mod;
	ntt(f,lim,-1);
	reverse(f,f+n+1);
	for(int i=1; i<=n; ++i)
		printf("%lld\n",(1ll*n*C(n,i)%mod
		                 -1ll*ifac[i]*f[i]%mod+mod)%mod);
	return 0;
}