#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
//first second
//memset(dp, -1, sizeof dp);

struct keycompare {
    bool operator()(const pair<ll, ll>& v, const ll& k) {
        return (v.first < k);
    }
    bool operator()(const ll& k, const pair<ll, ll>& v) {
        return (k < v.first);
    }
};

ll mod1=998244353,mod2=1000000007,limit=9223372036854775807;
long double pi=3.1415926535897932;
ll modpow(ll x, ll n, ll m) {

    if(x>m){
        x%=m;
    }
    if (n == 0) return 1%m;
    ll u = modpow(x,n/2,m);
    u = (u*u)%m;
    if (n%2 == 1) u = (u*x)%m;
    return u;
}
ll gcd(ll a, ll b)
{ 
    if (b == 0) 
        return a; 
    return gcd(b, a % b);  

}
bool isprime(ll n){
    if(n==2)
        return true;
    for(ll i=2;i*i<=n;i++){
        if(n%i==0)
            return false;
    }
    return true;
}

ll power(ll x,ll n){
    ll x_n=1;
    for(ll i=0;i<n;i++){
        x_n*=x;
    }
    return x_n;
}

ll pre[200005][305];
ll fact[305], inverse[305];
int ncr(int n,int r){
    ll ans=(fact[n]*inverse[r])%mod1;
    ans=(ans*inverse[n-r])%mod1;
    return ans;
}

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    fact[0]=1,inverse[0]=1;
    for(int i=1;i<305;i++){
        fact[i]=(fact[i-1]*i)%mod1;
        inverse[i]=modpow(fact[i],mod1-2,mod1);
    }
    int n,k; cin>>n>>k;
    int arr[n];
    for(int i=0;i<n;i++){
        cin>>arr[i];
        pre[i][0]=1;
    }
    ll tempo[k+1]={0};
    tempo[0]=n;
    for(int i=0;i<n;i++){ 
        for(int j=1;j<=k;j++){      
            pre[i][j]=(pre[i][j-1]*arr[i])%mod1;
            tempo[j]=(tempo[j]+pre[i][j])%mod1;
        }
    }
    int check=modpow(2,mod1-2,mod1);
    for(int x=1;x<=k;x++){
        ll result=0;
        for(int p=0;p<=x;p++){
            ll tempans=(tempo[x-p]*tempo[p])%mod1;
            tempans=(tempans*ncr(x,p))%mod1;
            result=(result+tempans)%mod1;
        }
        result=(result-(modpow(2,x,mod1)*tempo[x]))%mod1;
        result=(result*check)%mod1;
        cout<<(result+mod1)%mod1<<"\n";
    }
    cout<<endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
#include <cstdint>
#include <string>
#include <sstream>

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define rep(i,n) for (int i = 0; i < (n); ++i)
typedef long long ll;
using P = pair<int,int>;

const int INF=1001001001;
const int mod =998244353;

struct mint {
  ll x; 
  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;
  }
   
  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;}
  struct combination {
  vector<mint> fact, ifact;
  combination(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(200005);

int main() {
  ll N,K;
  cin>>N>>K;
  vector<mint>A(N);
  rep(i,N){
    int a;
    cin>>a;
    A[i]=a;
  }
  vector<mint>sum(K+1);
  rep(i,N){
    mint ki=1;
    rep(k,K+1){
      sum[k]=(sum[k]+ki);
      ki=ki*A[i];
    }
  }
  for(int x=1;x<=K;x++){
    mint ans=0;
    rep(k,x+1){
      ans+=c(x,k)*sum[k]*sum[x-k];
    }
    mint p=mint(2).pow(x)*sum[x];
    cout<<(ans-p)/2<<endl;
  }
  return 0;
}
  