#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <math.h>
#include <cassert>
#define rep(i,n) for(int i = 0; i < n; ++i )
using namespace std;
using ll = long long;
// auto mod int
const int mod = 998244353;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {if ((x += a.x) >= mod) x -= mod; return *this;}
  mint& operator-=(const mint a) {if ((x += mod-a.x) >= mod) x -= mod; return *this;}
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }
  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}
// combination mod prime
struct Comb {
  vector<mint> fact, ifact;
  Comb(int n):fact(n+1),ifact(n+1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n]*ifact[k]*ifact[n-k];
  }
} c(300);

int main() {
  int n,k;
  cin >> n >> k;
  vector<int> a(n);
  vector<mint> b(n);
  rep(i,n) cin >> a[i], b[i] = a[i];

  vector<mint> s(k+1);
  s[0] = n;
  rep(p,k)rep(i,n) s[p+1] += b[i], b[i] *= a[i];

  mint m = mint(1)/2;
  for(int x=1;x<=k;++x){
    mint ans = 0;
    rep(i,x+1) ans += c(x,i) * s[i] * s[x-i];
    ans -= s[x] * mint(2).pow(x);
    ans *= m;
    cout << ans << endl;
  }
}
#include <bits/stdc++.h>

const int K = 300;
const int N = 200000;
const int P = 998244353;
inline int add(int x, int y) {x += y; return x >= P ? x - P : x;}
inline int sub(int x, int y) {x -= y; return x < 0 ? x + P : x;}
inline int mul(int x, int y) {return (int)(1ll * x * y % P);}

int s[K + 5], t[K + 5], c[K + 5][K + 5];

int p[N + 5], a[N + 5], n, k;
int main() {
	scanf("%d%d", &n, &k);
	for(int i=1;i<=n;i++) scanf("%d", &a[i]), p[i] = 1;
	for(int j=0;j<=k;j++) for(int i=1;i<=n;i++)
		s[j] = add(s[j], p[i]), t[j] = add(t[j], mul(p[i], p[i])), p[i] = mul(p[i], a[i]);
	for(int i=0;i<=k;i++) for(int j=0;j<=i;j++)
		c[i][j] = (j ? add(c[i - 1][j - 1], c[i - 1][j]) : 1);
	
	int iv2 = (P + 1) >> 1;
	for(int i=1;i<=k;i++) {
		int ans = 0;
		for(int j=0;j<=i;j++) {
			int del = mul(iv2, sub(mul(s[j], s[i - j]), s[i]));
			ans = add(ans, mul(c[i][j], del));
		}
		printf("%d\n", ans);
	}
}