#include <bits/stdc++.h>

using namespace std;
typedef long long LL;

const int MAXN = 2E5 + 5;
const int MOD = 998244353;
int n, k;
LL sum[301], C[301][301], a[MAXN];

template <class T>
void read(T& x) {
    x = 0;
    T f = 1;
    char ch = getchar();
    while (ch < '0' || ch > '9') f = (ch == '-' ? -1 : 1), ch = getchar();
    while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
    x *= f;
}

template <class T, class... Args>
void read(T& x, Args&... args) {
    read(x), read(args...);
}

LL qpow(LL a, LL b, LL MOD) {
    LL ans = 1, base = a;
    while (b) {
        if (b & 1) ans = ans * base % MOD;
        b >>= 1, base = base * base % MOD;
    }
    return ans;
}

void add(LL& a, LL b) { a = ((a + b) % MOD + MOD) % MOD; }

void init() {
    for (int i = 0; i <= 300; i++) C[i][0] = 1;
    for (int i = 1; i <= 300; i++)
        for (int j = 1; j <= 300; j++)
            C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
    sum[0] = n;
    for (int i = 1; i <= n; i++) {
        LL tmp = 1;
        for (int x = 1; x <= k; x++) {
            tmp = tmp * a[i] % MOD;
            add(sum[x], tmp);
        }
    }
}

signed main() {
    read(n, k);
    for (int i = 1; i <= n; i++) read(a[i]);
    init();
    for (int x = 1; x <= k; x++) {
        LL ans = 0;
        for (int i = 0; i <= x; i++)
            add(ans, C[x][i] * (sum[i] * sum[x - i] % MOD - sum[x]) % MOD);
        printf("%lld\n", ans * qpow(2, MOD - 2, MOD) % MOD);
    }
    return 0;
}
#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(long 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,sum[301]={0},temp=1,total=0;
  fact[0]=1;rep(i,K)fact[i+1]=1l*fact[i]*(i+1)%MOD;
  inv[K]=MPow(fact[K],MOD-2);
  rep(i,K)inv[K-1-i]=1l*inv[K-i]*(K-i)%MOD;
  rep(i,N){A=IN();temp=1;rep(j,K+1){sum[j]=(sum[j]+temp)%MOD;temp=1l*temp*A%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)%MOD)%MOD;}
    total=(1l*total-1l*sum[i+1]*MPow(2,i+1)%MOD)%MOD;
    OUT(1l*((1l*total+MOD)%MOD)*inv2%MOD);
  }
}