#include <bits/stdc++.h>
using namespace std;

const int MAX_N = 200000;
typedef long long ll;
const ll MOD = 998244353;

int n, k;
ll A[MAX_N];
ll S[301];
ll inv[301];

ll func(ll t) {
    ll ans = 1;
    ll pow = MOD - 2;
    while (pow > 0) {
        if (pow&1)
            ans = ans * t % MOD;
        t = t * t % MOD;
        pow >>= 1;
    }
    return ans;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> n >> k;

    for (int j = 0; j <= k; j++) {
        S[j] = 0;
        if (j > 0)
            inv[j] = func(j);
    }

    for (int i = 0; i < n; i++) {
        cin >> A[i];
        ll tmp = 1ll;
        S[0] += tmp;
        for (int j = 1; j <= k; j++) {
            tmp = tmp * A[i] % MOD;
            S[j] += tmp;
            if (S[j] >= MOD)
                S[j] -= MOD;
        }
    }

    for (int x = 1; x <= k; x++) {
        ll ans = 0;

        ll comb = 1ll;
        for (int i = 0; i * 2 + 1 <= x; i++) {
            if (i > 0)
                comb = comb * (x - i + 1) % MOD * inv[i] % MOD;
            ll tmp = S[i] * S[x - i] % MOD + MOD - S[x];
            if (tmp >= MOD)
                tmp -= MOD;
            ans = ans + (comb * tmp % MOD);
            if (ans >= MOD)
                ans -= MOD;
        }

        if (x % 2 == 0) {
            comb = comb * (x / 2 + 1) % MOD * inv[x / 2] % MOD;
            ll tmp = (S[x / 2] * S[x / 2] % MOD + MOD - S[x]) * inv[2] % MOD;
            ans = ans + (comb * tmp % MOD);
            if (ans >= MOD)
                ans -= MOD;
        }
        cout << ans << "\n";
    }
}

#include <bits/stdc++.h>

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,n) for (int i = 0; i < (n); i++)
#define forr(i,a,b) for (int i = a; i <= b; i++)
#define all(v) v.begin(), v.end()
#define pb(x) push_back(x)

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<ll, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;

const int MX = 200005, mod = 998244353;
const ll inv2 = (mod + 1) / 2;
int n, k;
ll res[MX], s[MX], comb[705][705], a[MX];

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);
	
	forn (i, 705) {
		comb[i][0] = 1;
		for (int j = 1; j <= i; j++)
			comb[i][j] = (comb[i - 1][j] + comb[i - 1][j - 1]) % mod;
	}
	
	cin >> n >> k;
	forn (i, n) cin >> a[i];
	
	forn (i, n) {
		ll x = 1;
		forn (j, k + 1) {
			(s[j] += x) %= mod;
			(x *= a[i]) %= mod;
		}
	}
	
	forn (i, k + 1) forn (j, k + 1) {
		(res[i + j] += comb[i + j][i] * s[i] % mod * s[j] % mod) %= mod;
		(res[i + j] -= comb[i + j][i] * s[i + j]) %= mod;
	}
	
	for (int i = 1; i <= k; i++) {
		(res[i] *= inv2) %= mod;
		cout << MOD(res[i], mod) << endl;
	}
	
	return 0;
}
