#include"iostream"
#include"cstdio"
#include"cmath"
#include"cstring"
#include"algorithm"
#include"stack"
#include"queue"
using namespace std;

#define read(x) scanf("%d",&x)
#define readl(x) scanf("%lld",&x)
#define ll long long 
#define ull unsigned long long
#define MOD 998244353
#define MAXN 200005 

int n,k;
ll sum[305],Cs[305];
ll fac[305];
ll a[MAXN];

ll quickpow(ll a,ll b)
{
	ll ans=1,base=a;
	while(b)
	{
		if(b&1) ans=ans*base%MOD;
		b>>=1;
		base=base*base%MOD;
 	}
 	return ans%MOD;
}

ll inv(ll a){return quickpow(a,MOD-2)%MOD;}

int main()
{
	read(n),read(k);
	fac[0]=1ll;
	for(int i=1;i<=n;i++) readl(a[i]);
	for(int i=1;i<=k;i++) fac[i]=fac[i-1]*i%MOD;
	for(int i=1;i<=n;i++)
	{
		ll op=1ll;
		for(int j=0;j<=k;j++)
		{
			sum[j]=(sum[j]+op)%MOD;
			op=op*a[i]%MOD;
		}
	}
	for(int x=1;x<=k;x++)
	{
		ll ans=0;
		if(x&1)
		{
			for(int i=0;i<=x/2;i++)
			{
				ll c=fac[x]*inv(fac[x-i]*fac[i]%MOD)%MOD;
				ll now=(sum[i]*sum[x-i]-sum[x]+MOD)%MOD;
				ans=(ans+now*c%MOD)%MOD;
			}
		}
		else
		{
			for(int i=0;i<x/2;i++)
			{
				ll c=fac[x]*inv(fac[x-i]*fac[i]%MOD)%MOD;
				ll now=(sum[i]*sum[x-i]%MOD-sum[x]+MOD)%MOD;
				ans=(ans+now*c%MOD)%MOD;
			}
			//499122177
			ll c=fac[x]*inv(fac[x/2]*fac[x/2]%MOD)%MOD;
			ll now=(sum[x/2]*sum[x/2]%MOD-sum[x]+MOD)%MOD;
			ans=(ans+now*c%MOD*499122177%MOD)%MOD;
		}
		printf("%d\n",ans%MOD);
	}
	return 0;
} 
#include<bits/stdc++.h>
using namespace std;
const int MN = 2e5 + 5, MK = 305, MOD = 998244353;
int a[MN], sum[MK], c[MK][MK];
int main () {
	int n,k;
	scanf ("%d %d",&n,&k);
	for (int i = 1; i <= n; i++) {
		int a,pw=1; scanf ("%d",&a);
		for (int i = 0; i <= k; i++) {
			sum[i] += pw;
			if (sum[i] >= MOD) sum[i] -= MOD;
			pw = (long long)pw * a % MOD;
		}
	}
	c[0][0] = 1;
	for (int x = 1; x <= k; x++) {
		int ans = 0;
		for (int i = 0; i <= x; i++) {
			c[x][i] = c[x-1][i] + (i?c[x-1][i-1]:0);
			if (c[x][i] >= MOD) c[x][i] -= MOD;
			ans = (ans + (long long)c[x][i] * ((long long)sum[i] * sum[x-i]%MOD + MOD - sum[x]) % MOD * 499122177LL) % MOD;
		}
		printf ("%d\n",ans);
	}
	return 0;
}
