#include <bits/stdc++.h>
using namespace std;
#define ll long long
vector<ll> arr, fact;
#define mod 998244353
// (1/a)%p = (pow(a,p-2))%p
void precalc()
{
    fact[0] = 1;
    fact[1] = 1;
    for (int i = 1; i <= 300; i++)
    {
        fact[i] = (i * fact[i - 1]) % mod;
    }
}
ll power(ll a, ll b)
{
    ll res = 1;
    while (b > 0)
    {
        if (b % 2)
            res = (res * a) % mod;
        a = (a * a) % mod;
        b = b / 2;
    }
    return res;
}
ll nCk(ll n, ll k)
{
    return (((fact[n] * power(fact[k], mod - 2)) % mod) * power(fact[n - k], mod - 2)) % mod;
}
int main()
{
    int n, k;
    cin >> n >> k;
    arr = vector<ll>(n);
    fact = vector<ll>(301);
    precalc();
    ll sum3 = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> arr[i];
        // sum3 = (sum3 + arr[i])%mod;
    }
    // sum3 = (sum3*2)%mod;
    vector<ll> sumarr(k + 1);
    for (int i = 0; i <= k; i++)
    {
        ll sum = 0;
        for (int j = 0; j < n; j++)
        {
            sum = (sum + power(arr[j], i)) % mod;
        }
        sumarr[i] = sum;
    }
    for (int x = 1; x <= k; x++)
    {
        ll sum = 0, sum4;
        for (int p = 0; p <= x; p++)
        {
            sum4 = 0;
            sum4 = (sum4 + nCk(x, p)) % mod;
            // cout<<"x: "<<x<<" p: "<<p<<" nCk: "<<nCk(x,p)<<endl;
            ll sum1 = 0, sum2 = 0;
            sum1 = sumarr[p];
            sum2 = sumarr[x - p];
            // for (int i = 0; i < n; i++)
            // {
            //     sum1 = (sum1 + power(arr[i], p))%mod;
            //     sum2 = (sum2 + power(arr[i], x - p))%mod;
            // }
            // cout<<"x: "<<x<<" p: "<<p<<" sum: "<<sum<<" sum1: "<<sum1<<" sum2: "<<sum2<<endl;
            sum4 = (sum4 * sum1) % mod;
            sum4 = (sum4 * sum2) % mod;
            sum = (sum + sum4) % mod;
            // cout<<"#"<<sum4<<endl;
        }
        // cout<<"*sum: "<<sum<<endl;
        sum3 = (sumarr[x] * power(2, x)) % mod;
        // for(int i=0;i<n;i++){
        //     sum3 = (sum3 + power(2*arr[i],x))%mod;
        // }
        // cout<<"sum3: "<<sum3<<endl;
        ll num1 = (sum - sum3 + mod) % mod;
        // cout<<"@num1: "<<num1<<endl;
        sum = (num1 * power(2, mod - 2)) % mod;
        cout << sum << "\n";
    }
    return 0;
}
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define vi vector<int>
#define pii pair<int,int>
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define ull unsigned long long
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i,k,j) for(int i=(k);i>=(j);i--)
#define For(i,k,j) for(int i=(k);i<=(j);i++)
#define Foe(i,u) for(int i=lst[u],v=e[i].v;i;i=e[i].nxt,v=e[i].v)
#define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define Fin(s) freopen(s,"r",stdin)
#define Fout(s) freopen(s,"w",stdout)
#define file(s) Fin(s".in"),Fout(s".out")
#define INF ((1<<30)-1)
#define int long long
const int P=998244353; //
using namespace std;
template<typename T>inline void ckmax(T &a,T b) {(a<b)&&(a=b);}
template<typename T>inline void ckmin(T &a,T b) {(a>b)&&(a=b);}
inline int mul(int a,int b) {return 1ull*a*b%P;}
inline int add(int a,int b) {return a+b>=P?a+b-P:a+b;}
inline int sub(int a,int b) {return a-b>=0?a-b:a-b+P;}
inline void mulmod(int &a,int b) {a=mul(a, b);}
inline void addmod(int &a,int b) {((a+=b)>=P)&&(a-=P);}
inline void submod(int &a,int b) {((a-=b)<0)&&(a+=P);}
inline int ksm(int a,int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline void fprint(const int &x,char c=' ') {fprintf(stderr,"%lld%c",x,c);}
inline void fprint(const pii &x,char c='\n') {fprintf(stderr,"%lld %lld%c",x.first,x.second,c);}
inline void fprint(const int *f,const int &n,char c='\n') {for(int i=1;i<=n;i++) fprint(f[i]); fprintf(stderr,"%c",c);}
inline void fprint(const vector<int> &f,char c='\n') {for(int i=0;i<(int)f.size();i++) fprint(f[i]); fprintf(stderr,"%c",c);}
inline int inv(int a) {return ksm(a,P-2);}
namespace FastIO {
  const int SIZE=1<<16; char buf[SIZE],obuf[SIZE],str[64]; int bi=SIZE,bn=SIZE,opt;
  int read(char *s) {
    while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
    int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
  }
  bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n) return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
  void write(int x) {
    if(!x) obuf[opt++]='0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
    if (opt>=(SIZE>>1)){fwrite(obuf,1,opt,stdout); opt=0;}
  }
  void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf,1,opt,stdout); opt=0;}}
	void Fflush() {if (opt) fwrite(obuf,1,opt,stdout); opt=0;}
};	
inline int read() {int x; FI(x); return x;}
const int MN=2e5+5,MK=305;
int n,K,t[MN][MK],S[MK],a[MN];
int fac[MN],ifac[MN];
int C(int n,int m) {
	if(n<m||n<0||m<0) return 0;
	return 1ll*fac[n]*ifac[m]%P*ifac[n-m]%P;
}
void init(int n=MN-5) {
	fac[0]=1; For(i,1,n) fac[i]=mul(fac[i-1],i); ifac[n]=inv(fac[n]);
	foR(i,n,1) ifac[i-1]=mul(ifac[i],i);
}
signed main() {
	#ifndef ONLINE_JUDGE
		freopen("pro.in","r",stdin);
		freopen("pro.out","w",stdout);
	#endif
	n=read(),K=read(); init();
	For(i,1,n) a[i]=read(),t[i][0]=1;
	For(i,1,n) {
		For(j,1,K) {
			t[i][j]=mul(t[i][j-1],a[i]);
		}
//		For(j,1,K) addmod(t[i][j],t[i][j-1]);
		For(j,0,K) addmod(S[j],t[i][j]);
	}
	For(x,1,K) {
		int ans=0;
		For(t,0,x) {
			addmod(ans,mul(C(x,t),mul(S[x-t],S[t])));
		} int p2=ksm(2,x);
		For(i,1,n) submod(ans,mul(p2,t[i][x]));
//		cerr<<p2<<endl;
		printf("%lld\n",mul(ans,inv(2)));
	}
	return FastIO::Fflush(),0;
}