#include<bits/stdc++.h>
using namespace std;
template<typename T>inline T read(){
	T f=0,x=0;char c=getchar();
	while(!isdigit(c)) f=c=='-',c=getchar();
	while(isdigit(c)) x=x*10+c-48,c=getchar();
	return f?-x:x;
}
namespace run{
	const int N=2e6+5,lim=309,mod=998244353,inv2=(mod+1)/2;
	inline int add(int x,int y){return x+y>=mod?x-mod+y:x+y;}
	inline int sub(int x,int y){return x>=y?x-y:x+mod-y;}
	inline int qpow(int x,int y){
		int ret=1;
		while(y){
			if(y&1) ret=1LL*x*ret%mod;
			x=1LL*x*x%mod,y>>=1;
		}
		return ret;
	}

	int C[lim][lim];
	inline void pre(int K){
		C[0][0]=1;
		for(int i=1;i<=K;i++){
			C[i][0]=1;
			for(int j=1;j<=i;j++) C[i][j]=add(C[i-1][j],C[i-1][j-1]);
		}
	}
	int n,a[N],K,sum[lim],pw[lim],ex[lim];
	int main(){
		n=read<int>(),K=read<int>(),pre(K);
		for(int i=1;i<=n;i++) a[i]=read<int>();

		for(int i=1;i<=n;i++){
			pw[0]=1;
			for(int k=1;k<=K;k++) pw[k]=1LL*pw[k-1]*a[i]%mod;
			for(int k=0;k<=K;k++) sum[k]=add(sum[k],pw[k]);
			pw[0]=1;
			for(int k=1;k<=K;k++) pw[k]=1LL*pw[k-1]*2%mod*a[i]%mod;
			for(int k=0;k<=K;k++) ex[k]=add(ex[k],pw[k]);
		}

		for(int k=1;k<=K;k++){
			int ans=0;
			for(int j=0;j<=k;j++)
				ans=(1LL*C[k][j]*sum[k-j]%mod*sum[j]+ans)%mod;
			ans=sub(ans,ex[k]),ans=1LL*ans*inv2%mod;
			printf("%d\n",ans);
		}
		return 0;
	}
}
int main(){
#ifdef my
	freopen(".in","r",stdin);
	freopen(".out","w",stdout);
#endif
	return run::main();
}
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define mp make_pair
#define fr first
#define sc second
template<int MOD=1000000007>
struct modint{
	/*static modint inv[2005];
	static void init(){
		for(int i=0;i<2005;i++)inv[i]=modpow(modint(i),MOD-2);
	}*/
	ull val;
	modint(ull x){ val=x%MOD; }
	modint(){}
	friend modint modpow(modint x,ull k){
		modint ret(1ULL);
		while(k>0){
			if(k&1ULL)ret*=x;
			x*=x;
			k>>=1;
		}
		return ret;
	}
	modint& operator +=(const modint& rhs){
		this->val+=rhs.val;
		if(this->val>=MOD)this->val-=MOD;
		return *this;
	}
	friend modint operator+(modint lhs, const modint& rhs){
		lhs+=rhs;
		return lhs;
	}
	modint& operator -=(const modint& rhs){
		this->val+=MOD-rhs.val;
		if(this->val>=MOD)this->val-=MOD;
		return *this;
	}
	friend modint operator-(modint lhs, const modint& rhs){
		lhs-=rhs;
		return lhs;
	}
	modint& operator *=(const modint& rhs){
		this->val*=rhs.val;
		this->val%=MOD;
		return *this;
	}
	friend modint operator*(modint lhs, const modint& rhs){
		lhs*=rhs;
		return lhs;
	}
	modint& operator /=(const modint& rhs){
		(*this)*=modpow(rhs,MOD-2);
		//(*this)*=inv[rhs.val];
		return *this;
	}
	friend modint operator/(modint lhs, const modint& rhs){
		lhs/=rhs;
		return lhs;
	}
};
//template<int MOD>
//modint<MOD> modint<MOD>::inv[2005];

const int MOD=998244353;
typedef modint<MOD> mi;

int n,k;
mi a[200010];
mi s[200010];
mi fac[302];
mi ret_[200010];

int main(){
	scanf("%d%d",&n,&k);
	for(int i=0;i<n;i++){
		int x;
		scanf("%d",&x);
		a[i]=x;
	}
	fac[0]=1;
	for(int i=1;i<=k;i++)fac[i]=fac[i-1]*i;
	for(int j=0;j<n;j++){
		mi p=1,q=1;
		for(int i=0;i<=k;i++){
			s[i]+=p;
			p*=a[j];
			ret_[i]+=q;
			q*=2*a[j];
		}
	}
	for(int i=0;i<=k;i++){
		s[i]/=fac[i];
	}
	for(int i=1;i<=k;i++){
		mi ret=0;
		for(int j=0;j<=i;j++){
			ret+=s[j]*s[i-j];
		}
		ret*=fac[i];
		ret-=ret_[i];
		ret/=2;
		printf("%d\n",(int)(ret.val));
	}
}