#include<stdio.h>
#include<bits/stdc++.h>
#define ll long long int
#define inf 1000000000000
#define mod 998244353
#define all(v) v.begin(),v.end()
#define fi first
#define se second
#define scan(a) scanf("%d",&a)
#define scanl(a) scanf("%lld",&a)
#define print(a) printf("%d\n",a)
#define printl(a) printf("%lld\n",a)
#define prints(a) printf("%d ",a)
#define printsl(a) printf("%lld ",a)
#define ps(x,y)   fixed<<setprecision(y)<<x
using namespace std;
const int N=303;
ll C[N][N];
ll a[N],ans[N];

ll add(ll x,ll y){
    ll res=x+y;
    if(res>=mod)res-=mod;
    return res;
}
ll sub(ll x,ll y){
    ll res=x-y;
    if(res<0)res+=mod;
    return res;
}
ll mult(ll x,ll y){
  return (x*y)%mod;
}

void solve()
{
    for(int i=0;i<N;i++){
        C[i][0]=C[i][i]=1;
    }
    for(int i=1;i<N;i++){
        for(int j=1;j<i;j++){
            C[i][j]=add(C[i-1][j-1],C[i-1][j]);
        }
    }

    int n,k;
    scan(n),scan(k);
    while(n--){
        ll x;
        scanl(x);
        ll p=1,q=1;
        a[0]=add(a[0],p);
        for(int i=1;i<=k;i++){
            p=mult(x,p);
            q=mult(2*x,q);
            a[i]=add(a[i],p);
            ans[i]=sub(ans[i],q);
        }
    }
    for(int x=1;x<=k;x++){
        for(int i=0;i<=x;i++){
            ans[x]=add(ans[x],mult(C[x][i],mult(a[x-i],a[i])));
        }
    }

    for(int i=1;i<=k;i++){
        ll x=ans[i];
        if(x&1)x+=mod;
        x/=2;
        printl(x);
    }

}
int main()
{
// #ifndef ONLINE_JUDGE
//     freopen("in.txt", "r", stdin);
//     freopen("out.txt", "w", stdout);
// #endif
    int t = 1;
    //scan(t);
    while (t--) {
        solve();
    }

}
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
//#include<boost/multiprecision/cpp_int.hpp>
//#include<boost/multiprecision/cpp_dec_float.hpp>
//namespace mp=boost::multiprecision;
//#define mulint mp::cpp_int
//#define mulfloat mp::cpp_dec_float_100
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
//constexpr int MOD=1000000007;
constexpr int MOD=998244353;
#define INF (1<<30)
#define LINF (lint)(1LL<<56)
#define endl "\n"
#define rep(i,n) for(lint (i)=0;(i)<(n);(i)++)
#define reprev(i,n) for(lint (i)=(n-1);(i)>=0;(i)--)
#define Flag(x) (1<<(x))
#define Flagcount(x) __builtin_popcountll(x)
#define pint pair<int,int>
#define pdouble pair<double,double>
#define plint pair<lint,lint>
#define fi first
#define se second
typedef long long lint;
int dx[8]={1,1,0,-1,-1,-1,0,1};
int dy[8]={0,1,1,1,0,-1,-1,-1};
const int MAX_N=2e5+5;
//struct edge{lint to,num;};
//vector<int> bucket[MAX_N/1000];

lint powmod(lint a,lint b){
  return b?powmod(a*a%MOD,b/2)*(b%2?a:1)%MOD:1;
}

lint fac[510000],finv[510000],inv[510000];
void COMinit(){
  fac[0]=fac[1]=1;
  finv[0]=finv[1]=1;
  inv[1]=1;
  for(int i=2;i<510000;i++){
    fac[i]=fac[i-1]*i%MOD;
    inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;
    finv[i]=finv[i-1]*inv[i]%MOD;
  }
}
lint COM(lint n,lint k){
  if (n<k) return 0;
  if (n<0 || k<0) return 0;
  return fac[n]*(finv[k]*finv[n-k]%MOD)%MOD;
}
lint facdiv(lint n,lint k){
  if (n<k) return 0;
  if (n<0 || k<0) return 0;
  return (fac[n]*finv[k])%MOD;
}

int main(void){
    COMinit();
    lint div2=powmod(2,MOD-2);
    lint N,K;
    cin >> N >> K;
    lint A[N];
    rep(i,N) cin >> A[i];
    //lint sum=accumulate(A,A+N,0LL);
    //sum%=MOD;
    lint powsumk[301];
    rep(i,301){
        lint suma=0;
        rep(j,N) suma+=powmod(A[j],i);
        powsumk[i]=suma%MOD;
    }
    for(int i=1;i<=K;i++){
        lint ans=0;
        rep(j,i+1){
            lint keisu=COM(i,j);
            lint res=(powsumk[j]*powsumk[i-j]-powsumk[i]+MOD)%MOD;
            //cout << powsumk[j] << " " << powsumk[j-i] << endl;
            res=(res*div2)%MOD;
            ans=(ans+res*keisu)%MOD;
        }
        cout << ans << endl;
    }
}