#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 3*1e5+2;
const int MOD = 998244353;

namespace numb{
	vector<bool> isprime;
	vector<int> fac,rfac,phi;
	vector<vector<int>> prime_factors;
	int add(int a,int b)
	{
	      a+=b;
	      if(a>=MOD) a-=MOD;
	      return a;
	}
	int sub(int a,int b)
	{
	      a-=b;
	      if(a<0) a+=MOD;
	      return a;
	}
	int mul(int a,int b)
	{     
	      return ((long long)a*b)%MOD;
	}
	int mpow(int a,int b)
	{
		int res=1;
		while(b>0){
			if(b&1)
				res=mul(res,a);
			a=mul(a,a);
			b=b>>1LL;
		}
		return res;
	}
	int rev(int a)
	{
		return mpow(a,MOD-2);
	}
	
	void seive(int n)
	{
		isprime.resize(n+2,true);
		isprime[0]=isprime[1]=false;
		for(int i=2;i*i<=n;i++)
		{
			if(isprime[i])
			{
				for(int j=i*i;j<=n;j+=i)
				{
					isprime[j]=false;
				}
			}
		}
	}
	void fact(int n)
	{
		fac.resize(n+2,0LL);
		rfac.resize(n+2,0LL);
		fac[0]=1;
		for(int i=1;i<=n;i++)
		{
			fac[i]=mul(fac[i-1],i);
		}
		rfac[n]=rev(fac[n]);
		for(int i=n-1;i>=0;i--)
		{
			rfac[i]=mul(rfac[i+1],i+1);
		}
	}
	
	int ncr(int n,int r)
	{
		if(r>n) return 0;
		int ans=mul(fac[n],mul(rfac[r],rfac[n-r]));
		return ans;
	}
	int phii(int n) {
		int result = n;
		for (int i = 2; i * i <= n; i++) {
		   if (n % i == 0) {
		       while (n % i == 0)
		           n /= i;
		       result -= result / i;
		   }
		}
		if (n > 1)
		   result -= result / n;
		return result;
	}
	void pre_phi(int n) {
		phi.resize(n+2,0);
		phi[0] = 0;
		phi[1] = 1;
		for (int i = 2; i <= n; i++)
		   phi[i] = i - 1;

		for (int i = 2; i <= n; i++)
		   for (int j = 2 * i; j <= n; j += i)
		         phi[j] -= phi[i];
	}
	int gcd(int a,int b)
	{
		return b?gcd(b,a%b):a;
	}
	int gcd(int a, int b, int & x, int & y) {
		if (a == 0) {
		   x = 0;
		   y = 1;
		   return b;
		}
		int x1, y1;
		int d = gcd(b % a, a, x1, y1);
		x = y1 - (b / a) * x1;
		y = x1;
		return d;
	}
	bool find_any_solution(int a, int b, int c, int &x0, int &y0, int &g) {
		g = gcd(abs(a), abs(b), x0, y0);
		if (c % g) {
		   return false;
		}
		x0 *= c / g;
		y0 *= c / g;
		if (a < 0) x0 = -x0;
		if (b < 0) y0 = -y0;
		return true;
	}
	
}
using namespace numb;

int fa[N];

int nck(int n,int k)
{
	// cout<<n<<" "<<k<<" "<<fa[n]<<"\n";
	// return 0;
	return mul(fa[n],mul(rev(fa[k]),rev(fa[n-k])));
}
int32_t main(){
	cin.tie(0)->sync_with_stdio(0);
	#ifdef LOCAL
	freopen("input.txt", "r", stdin);
	#endif
	int n,k;
	cin>>n>>k;
	int a[n];
	fa[0]=1;
	for(int i=1;i<N;i++)
	{
		fa[i] = mul(fa[i-1],i);
	}
	for(int i=0;i<n;i++) cin>>a[i];
	int ans[k+1],ans2[k+1];
	for(int i=0;i<=k;i++){
		int sum=0;
		int sum2 =0 ;
		for(int j=0;j<n;j++)
		{
			sum=add(sum,mpow(a[j],i));
			sum2 = add(sum2,mpow(2*a[j],i));
		}
		ans2[i]=sum2;
		ans[i] = sum;
		// cout<<ans[i]<<" ";
	}
	// return 0;
	int ann =0 ;
	for(int x=1;x<=k;x++)
	{
		int an =0;
		for(int o=0;o<=x;o++)
		{	
			// cout<<nck(x,o)<<" "<<ans[o]<<" "<<ans[x-o]<<"\n";
			// cout<<ans[o]<<"\n";
			an=add(an,mul(nck(x,o),mul(ans[o],ans[x-o])));
		}
		an=sub(an,ans2[x]);
		cout<<mul(an,rev(2))<<"\n";
		// ann=add(ann,an);
	}
	// cout<<ann;
} 

#include <cstdio>
#include <cstring>
#include <algorithm>
const int p=998244353;
const int maxn=2e5+1;
#define int long long
#define rep(a,b,c) for(int a=b;a<=c;a++)
int n,k,a[maxn],sum[301],fac[301],inv[301],inv2=(1ll*p+1)/2,s[maxn],ans,tmp;
inline int ksm(int a,int b) { int ans=1,tmp=a; for(;b;b>>=1,(tmp*=tmp)%=p) if(b&1) (ans*=tmp)%=p; return ans; }
inline int C(int a,int b) {
	return (((fac[a]*inv[b])%p)*inv[a-b])%p;
}
inline void solve() {
	scanf("%lld %lld",&n,&k);
	rep(i,1,n) scanf("%lld",&a[i]);
	fac[0]=1; inv[0]=1;
	rep(i,1,k) fac[i]=(fac[i-1]*i)%p,inv[i]=ksm(fac[i],p-2);
	rep(x,0,k) {
		if(!x) rep(i,1,n) s[i]=1;
		else rep(i,1,n) (s[i]*=a[i])%=p;
		sum[x]=0;
		rep(i,1,n) (sum[x]+=s[i])%=p;
	}
	rep(x,1,k) {
		ans=0;
		rep(i,0,x) {
			tmp=0; tmp+=(sum[i]*sum[x-i]); tmp%=p; tmp-=sum[x]; (tmp+=p)%=p; (tmp*=inv2)%=p;
			(ans+=(tmp*C(x,i)))%=p;
		}
		printf("%lld\n",ans);
	}
}
signed main() {
	//int TEST; scanf("%d",&TEST); while(TEST--)
	solve();
}