#include<bits/stdc++.h>

using namespace std;

#define FOR(i, x, y) for(int i = (x); i < (y); ++i)
#define REP(i, x, y) for(int i = (x); i <= (y); ++i)
#define PB push_back
#define MP make_pair
#define PH push
#define fst first
#define snd second
typedef long long ll;
typedef unsigned long long ull;
typedef double lf;
typedef long double Lf;
typedef pair<int, int> pii;

const int maxn = 2e5 + 5;
const int maxk = 305;
const int INF = 998244353;

class Number{
public:
	int dat;
	Number(){}
	Number(int dat_): dat(dat_){}
	inline Number&operator += (const Number &oth){ (dat += oth.dat) -= (dat >= INF ? INF : 0); return *this; }
	inline Number&operator -= (const Number &oth){ (dat -= oth.dat) += (dat < 0 ? INF : 0); return *this; }
	inline Number&operator *= (const Number &oth){ dat = 1ll * dat * oth.dat % INF; return *this; }
	inline Number operator + (const Number &oth)const{ Number ret = *this; ret += oth; return ret; }
	inline Number operator - (const Number &oth)const{ Number ret = *this; ret -= oth; return ret; }
	inline Number operator * (const Number &oth)const{ Number ret = *this; ret *= oth; return ret; }
}a[maxn], binom[maxk][maxk], pw[2][maxn], s[maxk];

const Number inv2 = (INF + 1) / 2;

int n, k;

inline void precalc(){
	int p = 0, q = 1;
	REP(i, 0, k){
		binom[i][0] = 1;
		REP(j, 1, i)
			binom[i][j] = binom[i - 1][j - 1] + binom[i - 1][j];
		FOR(j, 0, n){
			pw[q][j] = (!i ? 1 : pw[p][j] * a[j]);
			s[i] += pw[q][j];
		}
		swap(p, q);
	}
	return;
}

int main(){
	scanf("%d%d", &n, &k);
	FOR(i, 0, n)
		scanf("%d", &a[i].dat);
		
	precalc();
	
	REP(x, 1, k){
		Number ans = 0;
		REP(i, 0, x){
			Number res = s[i] * s[x - i] - s[x];
			ans += res * binom[x][i];
		}
		printf("%d\n", (ans * inv2).dat);
	}
	return 0;
}

#include <bits/stdc++.h>
// clang-format off
using namespace std; using ll = int64_t; using ull = uint64_t; const ll INF = 9e18;
void print0() {}
template<typename Head,typename... Tail> void print0(Head head,Tail... tail){cout<<fixed<<setprecision(15)<<head;print0(tail...);}
void print() { print0("\n"); }
template<typename Head,typename... Tail>void print(Head head,Tail... tail){print0(head);if(sizeof...(Tail)>0)print0(" ");print(tail...);}
// clang-format on

const ll MODULO = 998244353;
ll mod_minus(ll x, ll modval) {
    if (x >= 0) {
        return x % modval;
    } else {
        ll mm = ((-x) % modval);
        if (mm == 0) {
            return 0;
        } else {
            return modval - mm;
        }
    }
}
ll mod(ll x) {
    return mod_minus(x, MODULO);
}

const ll COMBMAX = 212345;
ll fac[COMBMAX], finv[COMBMAX], inv[COMBMAX];
void combination_init() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < COMBMAX; i++) {
        fac[i] = fac[i - 1] * i % MODULO;
        inv[i] = MODULO - inv[MODULO % i] * (MODULO / i) % MODULO;
        finv[i] = finv[i - 1] * inv[i] % MODULO;
    }
}
ll combination(ll n, ll k) {
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MODULO) % MODULO;
}

int main() {
    ll N, K;
    cin >> N >> K;

    vector<ll> a(N);
    for (ll i = 0; i < N; i++) {
        cin >> a[i];
    }

    vector<ll> apow(N, 1);
    vector<ll> powsum(K + 1, 0);
    powsum[0] = N;
    for (ll k = 1; k <= K; k++) {
        for (ll i = 0; i < N; i++) {
            apow[i] = (apow[i] * a[i]) % MODULO;
            powsum[k] = (powsum[k] + apow[i]) % MODULO;
        }
    }

    combination_init();
    for (ll k = 1; k <= K; k++) {
        ll result = 0;
        for (ll m = 0; m <= k; m++) {
            ll v = 0;
            v = mod(powsum[m] * powsum[k - m]);
            v = mod(v - powsum[k]);
            v = mod(combination(k, k - m) * v);
            result = mod(v + result);
        }
        result = mod(finv[2] * result);
        print(result);
    }
}
