#include<iostream>
#include<vector>

using i64 = int64_t;
template<i64 MOD>
struct modint{
  i64 val;
  modint():val(0){}
  modint(i64 v):val(v<0?(-v)%MOD:v%MOD){}
  operator i64(){return val;}
  modint &operator += (modint other){this->val+=other.val;if(this->val>=MOD)this->val-=MOD;return *this;}
  modint &operator -= (modint other){this->val-=other.val;if(this->val<0)this->val+=MOD;return *this;}
  modint &operator *= (modint other){this->val*=other.val;if(this->val>=MOD)this->val%=MOD;return *this;}
  modint &operator /= (modint other){this->val*=other.inverse();if(this->val>=MOD)this->val%=MOD;return *this;}
  modint operator + (modint other)const{return modint(val)+=other;}
  modint operator - (modint other)const{return modint(val)-=other;}
  modint operator * (modint other)const{return modint(val)*=other;}
  modint operator / (modint other)const{return modint(val)/=other;}
  template<class T>modint operator + (T other)const{return modint(val)+=(modint)other;}
  template<class T>modint operator - (T other)const{return modint(val)-=(modint)other;}
  template<class T>modint operator * (T other)const{return modint(val)*=(modint)other;}
  template<class T>modint operator / (T other)const{return modint(val)/=(modint)other;}
  template<class T>
  modint mpow(T _n)const{i64 n = _n;modint res(1),base(val);while(n){if(n&1)res*=base;base *= base;n >>= 1;}return res;}
  template<class T,class U>
  static modint mpow(T t,U u){return modint(t).mpow(u);}
  modint inverse()const{return mpow(val,MOD-2);}
  friend std::ostream &operator << (std::ostream& os,modint mo){return os<<mo.val;}
  friend std::istream &operator >> (std::istream& is,modint& mo){return is>>mo.val;}
};
constexpr int MOD = 998244353;
using mint = modint<MOD>;
mint operator""_m(unsigned long long x){return (mint)x;}

#define rep(i,n) for(int i=0;i<(int)n;++i)

signed main(){

  int n,k;
  std::cin>>n>>k;
  std::vector<mint> a(n);
  for(auto& ai:a)std::cin>>ai;

  std::vector<mint> fac(k+1),inv(k+1),finv(k+1);
  fac[1]=inv[1]=finv[0]=finv[1]=1;
  for(int i=2;i<=k;++i){
    fac[i]=fac[i-1]*i;
    inv[i]=MOD-inv[MOD%i]*(MOD/i);
    finv[i]=finv[i-1]*inv[i];
  }
  std::vector<mint> ushi(k+1);
  rep(j,k+1)rep(i,n)ushi[j]+=(a[i]*2_m).mpow(j);
  std::vector<mint> tapu(k+1);
  rep(j,k+1)rep(i,n)tapu[j]+=a[i].mpow(j)*finv[j];

  auto solve = [&](i64 x){
    mint ans = 0;
    for(int k=0;k<=x;++k){
      ans += tapu[k]*tapu[x-k];
    }
    ans *= fac[x];
    ans -= ushi[x];
    ans /= 2;
    return ans;
  };
  for(int x=1;x<=k;++x)
    std::cout<<solve(x)<<'\n';

}
#include <bits/stdc++.h>
#define int long long
using namespace std;

const int maxn = 2e5+8, inf  = 1e18+9, mod  = 998244353;

int n, k, a[maxn], sa[312][maxn], sb[312][maxn], C[312][312];

void solve() {
    int i, j, ans = 0, inv2 = (mod - mod / 2);
    cin >> n >> k;
    for (i = 1; i <= 300; i++) C[i][i] = C[i][0] = 1;
    for (i = 2; i <= 300; i++) for (j = 1; j < i; j++) C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
    for (i = 1; i <= n; i++) cin >> a[i], sa[0][i] = 1, sb[0][i] = 1;
    for (i = 1; i <= k; i++) for (j = 1; j <= n; j++) sa[i][j] = (sa[i - 1][j] * a[j]) % mod, sb[i][j] = (sb[i - 1][j] * 2 * a[j]) % mod;
    for (i = 0; i <= k; i++) for (j = n - 1; j >= 1; j--) sa[i][j] = (sa[i][j] + sa[i][j + 1]) % mod, sb[i][j] = (sb[i][j] + sb[i][j + 1]) % mod;
    for (int kk = 1; kk <= k; kk++) {
        for (ans = i = 0; i <= kk; i++) ans = (ans + (((C[kk][i] * sa[i][1]) % mod) * sa[kk - i][1]) % mod) % mod;
        cout << (inv2 * (mod + ans - sb[kk][1])) % mod << endl;
    }
}

signed main() {
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); //cout << fixed << setprecision(15);
    int t = 1; //cin >> t;
    while (t--) solve();
    return 0;
}

