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++14 (GCC 5.4.1) (judge verdict: Accepted)

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
#define fo(i,a,b) for(i=a;i<=b;i++)

using namespace std;

const int maxn=2e5+5,G=5,md=924844033;

int f[maxn*4],F[maxn],b[maxn*4],t[maxn*4],size[maxn];
int w[maxn*4],_w[maxn*4],cc[maxn],inv[maxn];
int fi[maxn],ne[maxn*2],dui[maxn*2],qc[maxn];
int i,j,k,l,m,n,now,x,y,N,ans;

void add(int x,int y){
	if (fi[x]==0) fi[x]=++now; else ne[qc[x]]=++now;
	dui[now]=y; qc[x]=now;
}
int quickmi(int x,int y){
	int t1=1;
	while (y){
		if ((y & 1)==1) t1=1ll*t1*x%md;
		x=1ll*x*x%md;
		y=y/2;
	}
	return t1;
}
void dfs(int x,int y){
	size[x]=1;
	for(int i=fi[x];i;i=ne[i]) if (dui[i]!=y){
		dfs(dui[i],x);
		F[size[dui[i]]]++; F[n-size[dui[i]]]++;
		size[x]=size[x]+size[dui[i]];
	}
}
void Ge_N(){
	N=1;
	while (N<=n) N=N*2;
	N=N*2;
}
void Ge_W(){
	w[0]=w[N]=1;
	int t=quickmi(G,(md-1)/N);
	fo(i,1,N-1) w[i]=1ll*w[i-1]*t%md;
	fo(i,0,N) _w[i]=w[N-i];
}
int reversal(int x){
	int t=0;
	for(int i=1;i<N;i<<=1,x>>=1) t=(t<<1)+(1&x);
	return t;
}
void DFT(int *x,int *w){
	int i,j,k,m,tmp;
	fo(i,0,N-1) t[i]=x[i];
	fo(i,0,N-1) x[reversal(i)]=t[i];
	for(i=2,m=1;i<=N;i<<=1,m<<=1){
		for(j=0;j<N;j+=i){
			fo(k,0,m-1){
				tmp=1ll*x[j+k+m]*w[N/i*k]%md;
				x[j+k+m]=(x[j+k]-tmp+md)%md;
				x[j+k]=(x[j+k]+tmp)%md;
			}
		}
	}
}
int C(int y,int x){
	return 1ll*inv[x]*inv[y-x]%md*cc[y]%md;
}
int main(){
//	freopen("t4.in","r",stdin);
	scanf("%d",&n);
	fo(i,1,n-1){
		scanf("%d%d",&x,&y);
		add(x,y); add(y,x);
	}
	cc[0]=1; inv[0]=1;
	fo(i,1,n){
		cc[i]=1ll*cc[i-1]*i%md;
		inv[i]=quickmi(cc[i],md-2);
	}
	dfs(1,0);
	l=1; b[0]=1;
	fo(i,1,n){
		l=1ll*l*i%md;
		f[n-i]=1ll*F[i]*l%md;
		b[i]=quickmi(l,md-2);
	}
	Ge_N();
	Ge_W();
	DFT(f,w);
	DFT(b,w);
	fo(i,0,N) f[i]=1ll*f[i]*b[i]%md;
	DFT(f,_w);
	l=quickmi(N,md-2);
	fo(i,0,n) f[i]=1ll*f[i]*l%md;
	l=1;
	fo(i,1,n){
		l=1ll*l*i%md;
		ans=(1ll*C(n,i)*n-1ll*f[n-i]*inv[i]%md+md)%md;
		printf("%d\n",ans);
	}
	return 0;
}