#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define rep(i,N) for(int i=0;i<(int)N;i++)
static inline void PUT(char c)
{
  static char buf[1<<15],*ptr=buf;
  if(ptr==buf+strlen(buf)||c==0){fwrite(buf,1,ptr-buf,stdout),ptr=buf;}*ptr++=c;
}
static inline int IN(void)
{
  int x=0,f=0,c=getchar();while(c<48||c>57){f^=c==45,c=getchar();}
  while(c>47&&c<58){x=x*10+c-48,c=getchar();}return f?-x:x;
}
static inline void OUT(int a)
{
  if(a<0)PUT('-'),a=-a;
  int d[40],i=0;do{d[i++]=a%10;}while(a/=10);
  while(i--){PUT(d[i]+48);}PUT('\n');
}
const int MOD=998244353,inv2=(MOD+1)/2;
int fact[301],inv[301];
static inline int MPow(int a,int b){return b?1l*MPow(1l*a*a%MOD,b>>1)*(b&1?a:1)%MOD:1;}
static inline int comb(const int n,const int k)
{
  if(k<0||n<k){return 0;}return 1l*fact[n]*inv[n-k]%MOD*inv[k]%MOD;
}
int main(void)
{
  int N=IN(),K=IN(),A[200000],sum[301]={0},temp[200000],total=0;sum[0]=N;
  fact[0]=1;rep(i,K)fact[i+1]=1l*fact[i]*(i+1)%MOD;
  inv[K]=MPow(fact[K],MOD-2);
  rep(i,N){A[i]=IN();temp[i]=1;}
  rep(i,K){inv[K-1-i]=1l*inv[K-i]*(K-i)%MOD;rep(j,N){temp[j]=(1l*temp[j]*A[j])%MOD;sum[i+1]=(1l*sum[i+1]+temp[j])%MOD;}}
  rep(i,K)
  {
    total=0;
    rep(j,i+2){total=(1l*total+1l*comb(i+1,j)*(1l*sum[j]*sum[i+1-j]%MOD-sum[i+1]+MOD)%MOD*inv2)%MOD;}
    OUT(total);
  }
}
#include <bits/stdc++.h> 
using namespace std;
using ll = long long;
template<typename T> using v2 = vector<vector<T>>;
template<typename T> inline v2<T> fill(int r, int c, const T& t){ return v2<T>(r, vector<T>(c, t)); }

const int MOD = 998244353;
inline int add(int a, int b){ return (a+b)%MOD; }
inline int sub(int a, int b){ return ((a-b)%MOD + MOD)%MOD; }
inline int mul(int a, int b){ return ((ll)a*b)%MOD; }
int pwr(int a, int b){
    if(!b) return 1;
    int temp = pwr(a, b/2);
    if(b%2) return mul(mul(temp, temp), a);
    return mul(temp, temp);
}

const int modinv2 = pwr(2, MOD-2);
inline int dvd2(int a){ return mul(a, modinv2); }

void solve(){
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for(int i = 0; i < n; ++i) cin >> a[i];

    v2<int> ch = fill(k+1, k+1, -1);
    for(int i = 0; i <= k; ++i) ch[i][0] = 1; 
    for(int j = 1; j <= k; ++j) ch[0][j] = 0; 
    for(int i = 1; i <= k; ++i){
        for(int j = 1; j <= k; ++j){
            ch[i][j] = add(ch[i-1][j-1], ch[i-1][j]);
        }
    }

    v2<int> pwrs = fill(n, k+1, -1);
    for(int i = 0; i < n; ++i){
        pwrs[i][0] = 1;
         for(int j = 1; j <= k; ++j){
            pwrs[i][j] = mul(pwrs[i][j-1], a[i]);
        }
    }

    vector<int> sums(k+1, 0);
    for(int i = 0; i <= k; ++i){
        for(int j = 0; j < n; ++j){
            sums[i] = add(sums[i], pwrs[j][i]);
        }
    }

    for(int i = 1; i <= k; ++i){
        int ans = 0;
        for(int j = 0; j <= i; ++j){
            int s = mul(sums[j], sums[i-j]);
            s = sub(s, sums[i]);
            s = mul(s, ch[i][j]);
            ans = add(ans, s);
        }
        ans = dvd2(ans);
        cout << ans << "\n";
    }
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    return 0;
}