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

#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define per(i, a, b) for(int i = (b)-1; i >= (a); --i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fst first
#define snd second

template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<pii> vii;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const ll mod = 998244353;

ll modpow(ll b, ll e) {
  ll ans = 1;
  for (; e; b = b * b % mod, e /= 2)
    if (e & 1) ans = ans * b % mod;
  return ans;
}

vl fac;
ll inv(ll x) {
  return modpow(x, mod-2);
}

ll c(ll n, ll r) { 
  if (r > n or r < 0) return 0;
  return (fac[n] * inv(fac[r]) % mod) * inv(fac[n-r]) % mod;
}


int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin.exceptions(cin.failbit);

  int n, k;
  cin >> n >> k;

  fac.pb(1);
  rep(i,1,212345) {
    fac.pb((fac.back()*i)%mod);
  }

  vl a(n);
  rep(i,0,n) cin >> a[i];

  vl s(k+1);
  rep(i,0,k+1) {
    rep(j,0,n) {
      s[i] += modpow(a[j], i);
      s[i] %= mod;
    }
  }

  rep(x,1,k+1) {
    ll ans = 0;
    rep(i,0,x+1) {
      ll tans = c(x, i);
      tans *= s[i];
      tans %= mod;
      tans *= s[x-i];
      tans %= mod;
      ans += tans;
      ans %= mod;
    }
    rep(i,0,n) {
      ans -= modpow(2*a[i], x);
      ans %= mod; ans += mod; ans %= mod;
    }
    ans *= inv(2);
    ans %= mod;
    ans += mod;
    ans %= mod;
    cout << ans << '\n';
  }


}
#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);
	}
}