#include <bits/stdc++.h>
// #include <atcoder/all>
// #include "icld.cpp"
using namespace std;
using ll = long long int;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vector<int>>;
using ss = string;
using db = double;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
#define V vector
#define P pair<int,int>
#define pi 3.14159265358979
#define rep(i,s,n) for(int i=(s);i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ci(x) cin >> x
#define cii(x) int x;cin >> x
#define cci(x,y) int x,y;cin >> x >> y
#define co(x) cout << x << endl
void chmax(int &x,int y){x=max(x,y);}
void chmin(int &x,int y){x=min(x,y);}

int ma=310;
ll mod=998244353;
ll f(ll n=mod-2){
  if(n==0)return 1;
  if(n==1)return 2;
  if(n%2)return 2*f(n-1)%mod;
  ll res=f(n/2);
  return res*res%mod;
}

int main(){
  cci(n,k);
  vll v(n);
  rep(i,0,n)ci(v[i]);

  V<vll> nck(ma,vll(ma,0));
  nck[0][0]=1;
  rep(i,0,ma-1){
    rep(j,0,i+1){
      ll now=nck[i][j];
      (nck[i+1][j]+=now)%=mod;
      (nck[i+1][j+1]+=now)%=mod;
    }
  }

  V<vll> vx(k+1,vll(n,1));
  vll All(k+1,0);
  rep(x,1,k+1){
    ll now=0;
    rep(i,0,n){
      now+=vx[x][i]=vx[x-1][i]*v[i]%mod;
      now%=mod;
    }
    All[x]=now;
  }

  ll inv2=f();
  rep(x,1,k+1){
    ll ans=0;
    rep(i,1,x){
      ll now=All[i]*All[x-i]%mod;
      (now*=nck[x][i])%=mod;
      (ans+=now)%=mod;
    }
    (ans*=inv2)%=mod;
    (ans+=(n-f(x-1))*All[x]%mod+mod)%=mod;
    co(ans);
  }
}
#include<bits/stdc++.h>

using namespace std;
#define ll long long
#define ull unsigned long long
#define i128 __int128
#define mp make_pair
#define ld long double
typedef pair<int, int> pii;
typedef priority_queue<int, vector<int>, greater<int> > small_heap;
typedef priority_queue<int> big_heap;
const int N = 1e6 + 100;
int T;
int n, a[N], m, s[400], c[400][400];
const ll mod = 998244353;

ll ksm(ll a, ll b) {
    ll c = 1;
    for (; b; b >>= 1) {
        if (b & 1) c = (ll) c * a % mod;
        a = (ll) a * a % mod;
    }
    return c;
}

int inv2;

int solve(int x) {
    int ans = 0;
    for (int j = 0; j <= x; j++) {
        ans = (ans + 1ll * c[x][j] * (1ll * s[x - j] * s[j] % mod - s[x] + mod) % mod) % mod;
    }
    return 1ll * (ans + mod) % mod * inv2 % mod;
}

int main() {
    inv2 = ksm(2ll, mod - 2) % mod;
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++)scanf("%d", &a[i]);
    for (int i = 1; i <= n; i++) {
        for (int j = 0, x = 1; j <= m; ++j, x = 1ll * x * a[i] % mod) {
            s[j] = (s[j] + x) % mod;
        }
    }
    c[0][0] = 1;
    for (int i = 1; i <= m; i++) {
        c[i][0] = 1;
        for (int j = 1; j <= i; j++) {
            c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % mod;
        }
    }
    for (int i = 1; i <= m; i++) {
        printf("%d\n", solve(i));
    }
    return 0;
}