#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll p=998244353;
ll n,k,b[200010][301],c[302][302],a[200010],sum[302];
ll ksm(ll x,ll y){
	ll sej=1;
	while(y){
		if(y&1)sej=sej*x%p;
		x=x*x%p;
		y/=2;
	}
	return sej;
}
int main(){
	ll i,j,x,y,xlh;
	scanf("%lld%lld",&n,&k);
	for(i=0;i<=k;i++)c[i][0]=1;
	for(i=1;i<=k;i++)
	 for(j=1;j<=i;j++)c[i][j]=(c[i-1][j]+c[i-1][j-1])%p;
	for(i=1;i<=n;i++)scanf("%lld",&a[i]);
	for(i=1;i<=n;i++)b[i][0]=1;
	sum[0]=n;
	for(x=1;x<=k;x++){
		//printf("%lld\n",x);
		for(i=1;i<=n;i++){
			b[i][x]=b[i][x-1]*a[i]%p;sum[x]=(sum[x]+b[i][x])%p;
		}
		//printf("%lld %lld\n",x,sum[x]);
		xlh=0;
		for(i=0;i<=x;i++){
			y=sum[i]*sum[x-i]%p*c[x][i]%p;
			xlh=(xlh+y)%p;
			y=c[x][i]*sum[x]%p;
			//xlh=(xlh+y+p)%p;
		}
		//for(i=0;i<=x;i++)printf("%lld ",c[x][i]);puts("");
		xlh=(xlh-sum[x]*ksm(2,x)%p+p)%p;
		xlh=xlh*ksm(2,p-2)%p;
		printf("%lld\n",xlh);
	}
}
#pragma GCC optimize ("Ofast")
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i=(a); i<(b); i++)
#define FORD(i, a, b) for (int i=(a); i>(b); i--)
#define PPC(x) __builtin_popcount(x)
#define MSB(x) (63 - __builtin_clzll(x))
#define SZ(x) ((int)(x).size())
#define pb push_back
#define ALL(x) (x).begin(), (x).end()
#define ithBit(m, i) ((m) >> (i) & 1)
#define ft first
#define sd second
#define kw(a) ((a) * (a))
#ifdef DEBUG
#include "debug.h"
#else
#define dbg(...) 0
#endif
using namespace std;

const int maxN = 1 << 18, mod = 998244353, maxK = 302;

template <typename T1, typename T2> inline void addMod(T1& a, T2 b) { a = (a + b) % mod; }
template <typename T1, typename T2> inline void multMod(T1& a, T2 b) { a = a * b % mod; }
template <typename T1, typename T2> inline void subMod(T1& a, T2 b) { a = (a + mod - b%mod) % mod; }

long long qpow(long long a, long long b)
{
	long long ret = 1ll;
	for (; b != 0; b /= 2)
	{
		if (b & 1)	multMod(ret, a);
		multMod(a, a);
	}
	return ret;
}

long long S[maxK], cf[maxK][maxK];
int T[maxN];

void solve()
{
	int n, k;
	scanf ("%d%d", &n, &k);
	
	cf[0][0] = 1ll;
	FOR(i, 1, k+1)
	{
		cf[i][0] = 1ll;
		FOR(j, 1, i+1)
			cf[i][j] = (cf[i-1][j-1] + cf[i-1][j]) % mod;
	}
	
	FOR(i, 1, n+1)
	{	
		scanf ("%d", T+i);
		long long p = 1ll;
		FOR(j, 0, k+1)
		{
			addMod(S[j], p);
			multMod(p, T[i]);
		}
	}
	
	long long pow2 = 2;
	
	FOR(x, 1, k+1)
	{
		long long res = 0;
		FOR(i, 0, x+1)
		{
			long long temp = cf[x][i];
			multMod(temp, S[i]);
			multMod(temp, S[x-i]);
			addMod(res, temp);
		}
		subMod(res, S[x] * pow2);
		multMod(res, qpow(2, mod-2));
		printf("%lld\n", res);
		multMod(pow2, 2);
	}
}
 
int main()
{	
	int t = 1;
	//scanf ("%d", &t);
	FOR(tid, 1, t+1)
	{
		//printf("Case #%d: ", tid);
		solve();
	}
	return 0;
}




