#include "bits/stdc++.h"

using namespace std;

const int MOD=998244353;

long long powMod(long long a,int p){
    if(p==1){
        return a%MOD;
    }
    if(p==0){
        return 1ll;
    }
    long long t=powMod(a,p/2);
    t*=t;
    t%=MOD;
    if(p&1){
        t*=a;
        t%=MOD;
    }
    return t;
}

long long inv(long long a){
    return powMod(a,MOD-2);
}

void solve(){
    int n,k;
    cin>>n>>k;
    int a[n];
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    long long fact[k+1];
    fact[0]=1ll;
    for(int i=1;i<k+1;i++){
        fact[i]=i*fact[i-1];
        fact[i]%=MOD;
    }
    long long sum[k+1];
    fill(sum,sum+k+1,0ll);
    for(int i=0;i<k+1;i++){
        for(int j=0;j<n;j++){
            sum[i]+=powMod(0ll+a[j],i);
            sum[i]%=MOD;
        }
    }
    long long ans[k+1];
    fill(ans,ans+k+1,0ll);
    for(int i=1;i<k+1;i++){
        for(int j=0;j<=i-j;j++){
            long long temp=(sum[j]*sum[i-j])%MOD;
            temp-=sum[i];
            temp%=MOD;
            temp=(temp+MOD)%MOD;
            temp*=fact[i];
            temp%=MOD;
            temp*=inv(fact[j]);
            temp%=MOD;
            temp*=inv(fact[i-j]);
            temp%=MOD;
            if(j==i-j){
                temp*=inv(2ll);
                temp%=MOD;
            }
            ans[i]+=temp;
            ans[i]%=MOD;
        }
        cout<<ans[i]<<'\n';
    }
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
    // cin>>t;
    while(t--){
        solve();
    }
    return 0;
}
#include "bits/stdc++.h"
using namespace std;
#define for_(i, s, e) for (int i = s; i < (int) e; i++)
#define for__(i, s, e) for (ll i = s; i < e; i++)
typedef long long ll;
typedef vector<int> vi;
typedef array<int, 2> ii;
#define endl '\n'

ll n, k;

ll nCr(ll v, ll r) {
	assert(r == 1 or r == 2);
	if (r == 1) return v;
	else if (r == 2) return (v*(v-1)) / 2;
}

ll raw(ll v, ll r) {
	if (v < 0) return 0;
	
	// assert(r == 2 or r == 3);
	return nCr(v+r-1, r-1);
}

ll count(ll v, ll r) {
	assert(r == 2 or r == 3);
	if (r == 2) {
		return raw(v, 2) - 2*raw(v-n, 2) + raw(v-2*n, 2);
	}
	
	return raw(v, 3) - 3*raw(v-n, 3) + 3*raw(v-2*n, 3) - raw(v-3*n, 3);
}

int main() {
#ifdef mlocal
	freopen("test.in", "r", stdin);
#endif
	
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	cin >> n >> k;
	ll s = 3;
	while (true) {
		ll temp = count(s-3, 3);
		if (temp >= k) break;
		k -= temp;
		s++;
	}
	
	// cout << "should be sum " << s << endl;
	ll a = 1;
	while (true) {
		ll temp = count(s-a-2, 2);
		if (temp >= k) break;
		k -= temp;
		a++;
	}
	
	// cout << "first should be " << a << endl;
	ll b = 1;
	while (true) {
		ll v = s-a-b-1;
		ll temp = (v < n) and (v >= 0);
		if (temp >= k) break;
		k -= temp;
		b++;
	}
	
	cout << a << " " << b << " " << s-a-b << endl;
}
