#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>

using namespace std;

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {REP(WW,n)cerr << v[WW] << ' ';cerr << endl;}
#define SHOW2d(v,WW,HH) {REP(W_,WW){REP(H_,HH)cerr << v[W_][H_] << ' ';cerr << endl;}}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 998244353LL

typedef long long ll;
typedef pair<ll,ll> P;

long long mod_div(long long a,long long b){
	long long tmp = MOD - 2,c = b,ret = 1;
	while(tmp > 0){
		if(tmp & 1){
			ret *= c;ret %= MOD;
		}
		c *= c;c %= MOD;tmp >>= 1;
	}
	return a*ret%MOD;
}

#define MAX_K 333333
vector<long long> fact(MAX_K);
long long combination(long long n, long long r){
  if(n < r || n < 0 || r < 0) return 0;
	if(fact[0] != 1){
		fact[0] = 1;
		for(long long i = 1;i < MAX_K;i++)fact[i] = (fact[i-1] * i) % MOD;
	}
    long long ret = fact[n];
	long long tmp = (fact[r] * fact[n-r]) % MOD;
    return mod_div(ret,tmp);
}

void mod_add(ll &a, ll b) {
	a += b;
	a %= MOD;
}

ll mp[202222][333];
ll memo[333][333];
ll seica[333];

int main(){
	cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);

	ll n, k;cin >> n >> k;
	REP(i, n) {
		ll a;cin >> a;
		ll tmp = 1;
		REP(j, k + 1) {
			mp[i][j] = tmp;
			tmp = tmp * a % MOD;
		}
	}

	REP(j, k + 1) {
		REP(i, n) {
			mod_add(mp[i + 1][j], mp[i][j]);
		}
	}

	for(ll i = 1;i <= k;i++) mod_add(seica[i], mp[n][i] * (n - 1) % MOD);
	for(ll i = 1;i <= k;i++) {
		for(ll j = 1;j <= i;j++) {
			if(i + j > k) continue;
			ll kake = combination(i + j, i);
			if(i == j) kake = mod_div(kake, 2);
			ll tmp = (MOD + mp[n][i] * mp[n][j] % MOD - mp[n][i+j]) % MOD;
			mod_add(seica[i + j], kake * tmp % MOD);
		}
	}

	for(ll i = 1;i <= k;i++) cout << seica[i] << endl;

	return 0;
}

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

#define int long long
const int MOD=998244353;
int d[305][223456];
int pw(int n,int k){
  assert(k>=0);
  int res=1;
  while(k){
    if(k&1)(res*=n)%=MOD;
    (n*=n)%=MOD;
    k>>=1;
  }
  return res;
}
std::vector<int> Factorial(5e6),Finverse(5e6);
inline void Cinit(){
  Factorial[0]=1;
  for(int i=1;i<5e6;i++)Factorial[i]=(Factorial[i-1]*i)%MOD;
  Finverse[4999999]=pw(Factorial[4999999],MOD-2);
  for(int i=4999998;i>=0;i--)Finverse[i]=(i+1)*Finverse[i+1]%MOD;
}
int nCk(int n,int k){
  if(n<k)return 0;if(k<0)return 0;
  if(!Factorial[0])Cinit();
  int res=Factorial[n];
  (res*=Finverse[k])%=MOD;
  (res*=Finverse[n-k])%=MOD;
  return res;
}

signed main(){
  int n,k;cin>>n>>k;
  vector<int> v(n);
  for(int i=0;i<n;i++)cin>>v[i];
  for(int i=0;i<n;i++)d[0][i]=1;
  vector<int> sum(k+1,0);
  for(int i=0;i<k;i++){
    for(int j=0;j<n;j++){
      d[i+1][j]=d[i][j]*v[j]%MOD;
    }
  }
  int B=pw(2,MOD-2);
  for(int i=0;i<=k;i++){
    for(int j=0;j<n;j++)(sum[i]+=d[i][j])%=MOD;
  }
  for(int x=1;x<=k;x++){
    int ans=0;
    for(int i=0;i<=x;i++){
      int tmp=nCk(x,i);
      int A=(sum[i]*sum[x-i]-sum[x])%MOD;
      (ans+=tmp*A)%=MOD;
    }
    if(ans<0)ans+=MOD;
    (ans*=B)%=MOD;
    cout<<ans<<endl;
  }
}
