#include<bits/stdc++.h>
#ifdef xay5421
#define D(...) fprintf(stderr,__VA_ARGS__)
#else
#define D(...) ((void)0)
#endif
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
#define each(x,v) for(auto&x:v)
#define SZ(x) ((int)(x).size())
#define pb push_back
#define eb emplace_back
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int brand(){return rng()&0X7FFFFFFF;}
const int P=998244353;
int n=40,a[1005],b[1005];
int main(){
	a[5]=1;
	rep(i,1,20){
		rep(j,1,n){
			b[j]=0;
		}
		rep(j,1,n){
			(b[(j+1)/2]+=a[j])%=P;
			(b[n+1-(j+1)/2]+=a[j])%=P;
		}
		rep(j,1,n)a[j]=b[j],D("%d ",a[j]-a[j-1]);
		D("\n");
	}
	/*rep(i,1,n){
		a[i]=brand()%P;
	}
	rep(i,1,100){
		rep(j,1,n)b[j]=a[j];
		rep(j,1,n/2)a[j]=(a[j]+a[n+1-j])%P;
		rep(j,1,n/2)a[j]=1LL*a[j]*((P+1)>>1)%P;
		per(j,n/2,1){
			a[j*2-1]=a[j*2]=a[j];
		}
		rep(j,1,n)D("%d ",a[j]);
		D("\n");
		rep(j,1,n){
			assert(2LL*a[j]%P==(b[(j+1)/2]+b[n+1-(j+1)/2])%P);
		}
	}*/
	return 0;
}
