#include <iostream>
#include <cassert>
#include <climits>
#include <bitset>
#include <stack>
#include <queue>
#include <iomanip>
#include <limits>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string.h>

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;

long long int INF = 3e18;
double Pi = 3.1415926535897932384626;

vector<ll> G[500005];
vector<P> tree[500010];
priority_queue <ll> pql;
priority_queue <P> pqp;
//big priority queue
priority_queue <ll,vector<ll>,greater<ll> > pqls;
priority_queue <P,vector<P>,greater<P> > pqps;
//small priority queue
//top pop

int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,-1,1};
char dir[] = "DRUL";
//ll bit[500005];
//↓,→,↑,←


#define p(x) cout<<x<<endl;
#define el cout<<endl;
#define pe(x) cout<<x<<" ";
#define ps(x) cout<<fixed<<setprecision(25)<<x<<endl;
#define pu(x) cout<<x;
#define re(i,n) for(i=0;i<n;i++);
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define deba(x) cout<< #x << " = " << x <<endl


ll mod = 1000000007;
ll rui(ll abc,ll bed){
    //abcのbed乗を計算する
    if(bed==0){return 1;}
    else{
        ll ced = rui(abc,bed/2);
        ced *= ced;
        ced %= mod;
        if(bed%2==1){ced*=abc; ced%=mod;}
        return ced;
    }
}
ll gcd(ll number1,ll number2){
    if(number1 > number2){
        swap(number1,number2);
    }
    if(number1 == 0 || number1 == number2){
        return number2;
    }else{
        return gcd(number2 % number1,number1);
    }
}
void YES(bool condition){
    if(condition){
        p("YES");
    }else{
        p("NO");
    }
    return;
}
void Yes(bool condition){
    if(condition){
        p("Yes");
    }else{
        p("No");
    }
    return;
}

ll n,m,num,sum,b,c,d,e,f,g,h,i,j,k,w,ok,ng,l,r,ans;
long double a;
ll x[500005],y[500005];
bool flag,dame;

ll sa[40];
void solve(ll reside,ll a,ll b,bool first){
	//pe(reside);pe(a);p(b);
	if(a == 0){
		//p(reside);
		if(reside == 0){
			ans += b;
			//p(b);
		}
		return;
	}
	if(reside < -1 * 10 * a || 10 * a < reside)return;
	for(int i=-9;i<=9;i++){
		if((reside - i * a) % 10 == 0){
			if(a == 99){
				solve((reside - i * a)/10,a / 100,b * (sa[i + 10] - first) * 10,0);
			}else{
				solve((reside - i * a)/10,a / 100,b * (sa[i + 10] - first),0);
			}
		}
	}
}

int main(){
    cin >> n;
	num = 9;
	ans = 0;
	if(n % 9 != 0){                      
		p(0);return 0;                    
	}
	for(i=0;i<20;i++){
		sa[i] = 10 - abs(10 - i);
	}
	for(int i=0;i<18;i++){
		solve(n,num,1,1);
		//p(num);
		num *= 10;
		num += 9;
	}
	p(ans);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
const int N=4010,M=1000010,P=998244353;
const int inf=0x3f3f3f3f;
const int INF=0xcfcfcfcf;
const double eps=1e-6,pi=asin(1)*2;
inline ll read();
#define cmax(a,b) a=max(a,b)
#define cmin(a,b) a=min(a,b)
inline int ADD(int a,int b) { return a+b>=P?a+b-P:a+b; }
inline int MINUS(int a,int b) { return a-b<0?a-b+P:a-b; }
#define plus(a,b) a=ADD(a,b)
#define minus(a,b) a=MINUS(a,b)
#define mul(a,b) a=(a*(b))%P
#define mem(a,b) memset(a,b,sizeof(a))
#define pii pair<int,int>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define pll pair<ll,ll>
#define mp(x,y) make_pair(x,y)

int K,n;
int C[N][N];
inline void init(int n=4000)
{
	for(int i=0;i<=n;i++)
	{
		C[i][0]=1;
		for(int j=1;j<=i;j++) C[i][j]=ADD(C[i-1][j-1],C[i-1][j]);
	}
}

const int sign[]={1,P-1};

#ifdef FILE
char buf[1<<25],*p1=buf,*p2=buf;
#define getchar() p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<25,stdin),p1==p2)?EOF:*p1++
#endif
inline ll read()
{
	ll s=0;
	bool flag=false;
	char ch=getchar();
	for(;ch<'0'||ch>'9';ch=getchar()) if(ch=='-') flag=true;
	for(;'0'<=ch&&ch<='9';ch=getchar()) s=(s<<3)+(s<<1)+(ch^'0');
	if(flag) return -s;
	return s;
}

int main()
{
#ifdef FILE
	freopen(FILE ".in","r",stdin);
	freopen(FILE ".out","w",stdout);
#endif
	K=read(),n=read();
	init();
	for(int k=2;k<=2*K;k++)
	{
		int p=min(k/2,K-(k-1)/2);
		int ans=0;
		for(int i=0;i<=p;i++) plus(ans,1ll*sign[i&1]*C[p][i]%P*C[n-2*i+K-1][K-1]%P);
		printf("%d\n",ans);
	}
	return 0;
}