#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
#define REP(i,n) for(int i=0;i<n;i++)
#define ALL(v) v.begin(),v.end()
constexpr ll MOD=998244353;
constexpr ll INF=1e18;

ll power(ll x, ll y){
	x%=MOD;
	ll ret=1;
	while(y){
		if(y&1) ret=ret*x%MOD;
		x=x*x%MOD;
		y>>=1;
	}
	return ret;
}
ll divid(ll x, ll y){
	x%=MOD;
	return x*power(y,MOD-2)%MOD;
}
 
const int MAX=510000;
ll fac[MAX], finv[MAX], inv[MAX];
void COMinit(){
	fac[0]=fac[1]=1;
	finv[0]=finv[1]=1;
	inv[1]=1;
	for (int i=2;i<MAX;i++){
		fac[i]=fac[i-1]*i%MOD;
		inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;
		finv[i]=finv[i - 1]*inv[i]%MOD;
	}
}
ll COM(int n, int k){
	if(n<k) return 0;
	if(n<0||k<0) return 0;
	return fac[n]*(finv[k]*finv[n-k]%MOD)%MOD;
}
 
int main(){
	COMinit();
	int n, k; cin >> n >> k;
	VI a(n); REP(i,n) cin >> a[i];
	VI p(n,1), sump(k+1,0);
	REP(i,k+1){
		REP(j,n){
			sump[i]=(sump[i]+p[j])%MOD;
			p[j]=p[j]*a[j]%MOD;
		}
	}
	for(int i=1;i<=k;i++){
		ll ans=0;
		for(int j=0;j<=i;j++){
			ans+=(sump[j]*sump[i-j]%MOD+MOD-sump[i])*COM(i,j)%MOD;
			ans%=MOD;
		}
		cout << divid(ans,2) << endl;
	}
	return 0;
}
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef pair<ll, ll> PP;
#define rep(i, n) for(ll i = 0; i < ll(n); i++)
#define rrep(i, n) for(ll i = n - 1; i > -1; i--)
#define all(v) v.begin(), v.end()
#define pb push_back
#define fi first
#define se second
template <class X> void print(X x) { cout << x << endl; }
#define in(A, n)                                                                                                       \
    rep(i, n) {                                                                                                        \
        cin >> f;                                                                                                      \
        A.push_back(f);                                                                                                \
    }

void print(vl x) {
    for(ll i : x) {
        cout << i << " ";
    }
    cout << endl;
}
const ll INF = (1LL << 61) - 1;
const ll MOD = 998244353;
const ll MAX_N = 500010;
ll a, b, c, d, e, f, h, x, y, z, p, q, n, t, r, k, w, l, ans, i, j, u, v, m;
ll codeforces = 1;
string S, T;
vector<vl> g(MAX_N);
vl A, B;
#include <cstdint>
template <std::uint_fast64_t Modulus> class modint {
    using u64 = std::uint_fast64_t;

  public:
    u64 a;
    constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {}
    constexpr u64 &value() noexcept { return a; }
    constexpr const u64 &value() const noexcept { return a; }
    constexpr modint operator+(const modint rhs) const noexcept { return modint(*this) += rhs; }
    constexpr modint operator-(const modint rhs) const noexcept { return modint(*this) -= rhs; }
    constexpr modint operator*(const modint rhs) const noexcept { return modint(*this) *= rhs; }
    constexpr modint operator/(const modint rhs) const noexcept { return modint(*this) /= rhs; }
    constexpr modint &operator+=(const modint rhs) noexcept {
        a += rhs.a;
        if(a >= Modulus) {
            a -= Modulus;
        }
        return *this;
    }
    constexpr modint &operator-=(const modint rhs) noexcept {
        if(a < rhs.a) {
            a += Modulus;
        }
        a -= rhs.a;
        return *this;
    }
    constexpr modint &operator*=(const modint rhs) noexcept {
        a = a * rhs.a % Modulus;
        return *this;
    }
    constexpr modint &operator/=(modint rhs) noexcept {
        u64 exp = Modulus - 2;
        while(exp) {
            if(exp % 2) {
                *this *= rhs;
            }
            rhs *= rhs;
            exp /= 2;
        }
        return *this;
    }
};
using mint = modint<MOD>;
void input() {
    cin >> n>>c;
    rep(i, n) {
        cin >> x;
        A.pb(x);
    }
}
void solve() {
    vector<mint> K(n, 1), T, kaijo;
    kaijo.pb(1);
    rep(i, 602) { kaijo.pb(kaijo.back() * (i + 1)); }
    rep(i, 602) {
        mint k = 0;
        rep(j, n) {
            k += K[j];
            K[j] *= A[j];
        }
        T.pb(k);
    }

    rep(i, c) {
        t = i + 1;
        mint ans = 0;
        for(ll j = 0; j <= t - j; j++) {
            if(j == 0) {
                ans += T[t]*(n-1);
            } else {
                mint p = T[j] * T[t - j] - T[t];
                if(j != t - j) {
                    ans += p * kaijo[t]/(kaijo[j] * kaijo[t - j] );
                } else
                    ans += p * kaijo[t]/(kaijo[j] * kaijo[t - j] ) / 2;
            }
        }
        print(ans.a);
    }
}
int main() {
    // cout<<fixed<<setprecision(15);
    cin.tie(0);
    ios::sync_with_stdio(false);
    input();
    while(codeforces--) {
        solve();
    }
}