#include <iostream>
#include <string>
#include <vector>
#include <utility>
using ll=long long;
using namespace std;
using P=pair<int,int>;

// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
//const int mod = 1000000007;
const int mod = 998244353;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  //mint inv() const { return pow(mod-2);}

  //supports not prime
  mint modinv(ll a) {
    long long b = mod, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= mod;
    if (u < 0) u += mod;
    mint res(u);
    return res;
}
  mint& operator/=(const mint a) { return *this *= modinv(a.x);}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

//combination
//under mint
vector<mint> fact;
vector<mint> finv;

void comb_init(int n){
    fact=vector<mint>(n+1);
    finv=vector<mint>(n+1);
    fact[0]=1;
    for(int i=1;i<=n;i++){
        fact[i]=fact[i-1]*i;
    }
    finv[0]=1;
    finv[n]=mint(1)/fact[n];
    for(int i=n;i>=2;i--){
        finv[i-1]=finv[i]*i;
    }
}

mint comb(int a,int b){
    return fact[a]*finv[b]*finv[a-b];
}

int main(){
    int N,K;
    cin>>N>>K;
    comb_init(K);
    vector<mint> A(N);
    for(int i=0;i<N;i++){
        cin>>A[i];
    }
    vector<vector<mint>> powA(N,vector<mint>(K+1,1));
    for(int i=0;i<N;i++){
        for(int j=1;j<=K;j++){
            powA[i][j]=powA[i][j-1]*A[i];
        }
    }
    vector<mint> sum(K+1,0);
    for(int i=0;i<=K;i++){
        for(int j=0;j<N;j++){
            sum[i]+=powA[j][i];
        }
    }

    for(int i=1;i<=K;i++){
        mint ans=0;
        for(int j=0;j<=i;j++){
            ans+=(comb(i,j)*(sum[i-j]*sum[j]-sum[i]));
        }
        ans/=2;
        cout<<ans<<endl;
    }

    return 0;
}

// Problem: D - Powers
// Contest: AtCoder - AtCoder Regular Contest 106
// URL: https://atcoder.jp/contests/arc106/tasks/arc106_d
// Memory Limit: 1024 MB
// Time Limit: 3000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define forn(i,x,n) for(int i = x;i <= n;++i)	

const int N = 2e5+7,M = 305,MOD = 998244353;
ll fx[M],fc[M],fsa[M],fsb[M],C[M][M];
int a[N],b[N];
ll fa[N][M],fb[N][M];
ll qmul(ll a, ll b, ll P) 
{
  	ll L = a * (b >> 25LL) % P * (1LL << 25) % P;
  	ll R = a * (b & ((1LL << 25) - 1)) % P;
  	return (L + R) % P;
}
ll qpow(ll a,ll b,ll p)
{
	ll res = 1 % p;
	while(b)
	{
		if(b & 1)	res = qmul(res,a,p);
		a = qmul(a,a,p);
		b >>= 1;
	}
	return res;
}
int fact[N],infact[N];
int qpow(int a,int b,int p)
{
    int res = 1 % p;
    while(b)
    {
        if(b & 1)   res = (ll)res * a % p;
        a = (ll)a * a % p;
        b >>= 1;
    }
    return res;
}

int main()
{
	int n,k,rev2 = qpow(2,MOD - 2,MOD);scanf("%d%d",&n,&k);
    forn(i,1,n)	scanf("%d",&a[i]),b[i] = 2 * a[i];
	fsa[0] = n,fsb[0] = n;
	C[0][0] = 1 ; 
	forn( i, 1, k ) forn( j, 0, i ) 
		C[i][j] = (!j) ? 1 : (C[i - 1][j - 1] + C[i - 1][j]) % MOD ;
	forn(i,1,n)
	{
		ll _a = 1,_b = 1;	
		forn(j,1,k)
		{
			_a = _a * a[i] % MOD,_b = _b * b[i] % MOD;
			fsa[j] = (fsa[j] + _a) % MOD,fsb[j] = (fsb[j] + _b) % MOD;
		}
	}
    
    forn(x,1,k)
    {
		ll lf = 0;
		forn(i,0,k)
		{
			ll t = qmul(fsa[i],fsa[x - i],MOD);
			t = qmul(C[x][i],t,MOD);
			lf = (lf + t) % MOD;
		}
		// cout << lf << endl;
		lf = ((lf - fsb[x]) % MOD + MOD) % MOD;
		printf("%lld\n",qmul(rev2,lf,MOD));
    }
    return 0;
}
