#include <bits/stdc++.h>
using namespace std;

#define MOD 998244353

long long pows(long long a, long long b) {
  long long left = b;
  long long ans = 1;
  long long ks = a;
  while (left > 0) {
    if (left%2 == 1) ans = ans*ks%MOD;
    left /= 2;
    ks = ks*ks%MOD;
  }
  return ans;
}

long long mod_inv(long long a) {
  return pows(a,MOD-2);
}

int main() {

  ios::sync_with_stdio(false);
  cin.tie(0);
  int n,k;
  cin >> n >> k;
  vector<long long> a(n);
  for (int i=0;i<n;i++) cin >> a[i];
  vector<long long> rj(k+1,0);
  for (int i=0;i<n;i++) {
    long long now = 1;
    for (int j=0;j<=k;j++) {
      rj[j] += now;
      rj[j] %= MOD;
      now = now*a[i]%MOD;
    }
  }
  for (int i=1;i<=k;i++) {
    long long total = 0;
    long long comb = 1;
    for (int j=0;j<=i;j++) {
      total += ((comb*rj[j])%MOD*rj[i-j])%MOD;
      total %= MOD;
      if (j != i) comb = (comb*(i-j)%MOD)*mod_inv(j+1);
      comb %= MOD;
    }
    long long dec = (pows(2,i)*rj[i])%MOD;
    long long ans = (total-dec+MOD)%MOD;
    cout << (ans*mod_inv(2))%MOD << endl;
  }
}

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
using namespace std;
template<typename T>void rd(T&x){int f=0,c;while(!isdigit(c=getchar()))f^=!(c^45);x=(c&15);while(isdigit(c=getchar()))x=x*10+(c&15);if(f)x=-x;}
template<typename T>void pt(T x,int c=-1){if(x<0)putchar('-'),x=-x;if(x>9)pt(x/10);putchar(x%10+48);if(c!=-1)putchar(c);}
const int N=200005,P=998244353,I=(P+1)/2;
int n,K,a[N],v[305],tmp[305],fac[N],ifac[N],inv[N];
int mul(int a,int b){return 1LL*a*b%P;}
int add(int a,int b){return a+=b-P,a+=a>>31&P;}
int sub(int a,int b){return a-=b,a+=a>>31&P;}
void uadd(int&a,int b){a+=b-P,a+=a>>31&P;}
void usub(int&a,int b){a-=b,a+=a>>31&P;}
int main(){
	fac[0]=fac[1]=ifac[0]=ifac[1]=inv[0]=inv[1]=1;
	rep(i,2,N-1)fac[i]=mul(fac[i-1],i),inv[i]=mul(P-P/i,inv[P%i]),ifac[i]=mul(ifac[i-1],inv[i]);
	rd(n),rd(K);
	rep(i,1,n){
		rd(a[i]);
		int pw=1;
		rep(j,0,K){
			if(j)pw=mul(pw,a[i]);
			v[j]=add(v[j],pw);
		}
	}
	rep(i,0,K){
		v[i]=mul(v[i],ifac[i]);
	}
	rep(i,0,K){
		rep(j,0,K-i){
			uadd(tmp[i+j],mul(v[i],v[j]));
		}
	}
	memcpy(v,tmp,sizeof(v));
	rep(i,0,K){
		v[i]=mul(v[i],fac[i]);
	}
	rep(i,1,n){
		int pw=1,k=add(a[i],a[i]);
		rep(j,0,K){
			if(j)pw=mul(pw,k);
			usub(v[j],pw);
		}
	}
	rep(i,0,K)v[i]=mul(v[i],I);
	rep(i,1,K)printf("%d\n",v[i]);
	return 0;
}