#include <bits/stdc++.h>

int mod = 998244353;

long long modinv(long long dividend, long long divisor, long long modnum){
    long long b = mod, u = 1, v = 0;
    while (b) {
        long long t = divisor / b;
        divisor -= t * b; std::swap(divisor, b);
        u -= t * v; std::swap(u, v);
    }
    u %= mod; 
    if (u < 0) u += mod;
    long long ans = dividend * u % mod;
    return ans;
}

int main(){
    int N, K;
    std::cin >> N >> K;
    std::vector< long long > A(N);
    for(int i=0; i<N; i++){
        std::cin >> A[i];
    }
    
    std::vector< long long > calc_sigma_u(K+1, 0);
    std::vector< long long > calc_sigma_l(K+1);
    
    for(int i=0; i<N; i++){
        long long tmp = 1;
        for(int j=0; j<=K; j++){
            calc_sigma_u[j] = (calc_sigma_u[j] + tmp) % mod;
            tmp = (tmp * A[i]) % mod;
        }
    }
    long long tmpa = 1;
    calc_sigma_l[0] = 1;
    for(int i=1; i<=K; i++){
        tmpa = (tmpa * i) % mod;
        calc_sigma_l[i] = tmpa;
    }
    
    long long Factorial = 1;
    long long two = 1;
    for(int i=1; i<=K; i++){
        Factorial = (Factorial * i) % mod;
        long long ans = 0;
        for(int j=0; j<=i; j++){
            long long tmp = (Factorial * calc_sigma_u[j]) % mod;
            tmp = (tmp * calc_sigma_u[i-j]) % mod;
            tmp = modinv(tmp, calc_sigma_l[j], mod);
            tmp = modinv(tmp, calc_sigma_l[i-j], mod);
            //std::cout << i<< " " << j << " " <<tmp <<std::endl;
            ans = (ans + tmp) % mod;
        }
        
        two = (two * 2) % mod;
        long long Subtraction = (calc_sigma_u[i] * two) % mod;
        if(ans < Subtraction){
            ans = ans + mod - Subtraction;
        }else{
            ans = ans - Subtraction;
        }
        
        std::cout << modinv(ans, 2, mod) << std::endl;
    }
    
    
    return 0;
}


#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;}
  constexpr modint &operator += (modint other){this->val+=other.val;if(this->val>=MOD)this->val-=MOD;return *this;}
  constexpr modint &operator -= (modint other){this->val-=other.val;if(this->val<0)this->val+=MOD;return *this;}
  constexpr modint &operator *= (modint other){this->val*=other.val;if(this->val>=MOD)this->val%=MOD;return *this;}
  constexpr modint &operator /= (modint other){this->val*=other.inverse();if(this->val>=MOD)this->val%=MOD;return *this;}
  constexpr modint operator + (modint other)const{return modint(val)+=other;}
  constexpr modint operator - (modint other)const{return modint(val)-=other;}
  constexpr modint operator * (modint other)const{return modint(val)*=other;}
  constexpr 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);
    modint 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)
constexpr int64_t COM_MAX = (int64_t)1e6;

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';

}