#include <bits/stdc++.h>
#define ll  long long
#define ull unsigned long long  
using namespace std;
#define  inf 1e9+18
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define mod 998244353
#define  f1(i,n) for(i=1;i<=n;i++)
#define f0(i,n)  for(i=0;i<n;i++)
#define w(x)   while(x--)
const int maxn=200003;
#define  pq priority_queue
#define  ff first
#define  ss second 
#define pb  push_back
#define lb lower_bound
#define ub upper_bound
#define  pq priority_queue
ll nck[302][302];
ll pre_c[maxn][301];
ll pow1[maxn][301];
ll n,k;
ll a[maxn];
void pre()
{
  ll i,j;
  for(i=0;i<=300;i++)
  {
    for(j=0;j<=i;j++)
    {
      if(j==0||i==0)
        nck[i][j]=1;
      else
        nck[i][j]=(nck[i-1][j-1]+nck[i-1][j])%mod;
    }
  }


}
void pre1()
{
  ll i,j;
  for(i=1;i<=n;i++)
  {
    for(j=0;j<=k;j++)
    {
      if(j==0)
        pow1[i][j]=1;
      else
        pow1[i][j]=(pow1[i][j-1]*a[i])%mod;
    }
  }
  for(j=0;j<=k;j++)
  {
    for(i=1;i<=n;i++)
    {
      pow1[i][j]=(pow1[i-1][j]+pow1[i][j])%mod;
    }
  }
}
ll power(ll n,ll p)
{
  ll r=1;
  while(p>0)
  {
    if(p%2)
    {
      r=(r*n)%mod;
      p--;
    }
    p=p/2;
    n=(n*n)%mod;
  }
  return r;
}
int main()
{
  fastio;
  int t;
  ll i,j,l,m;
  cin>>n>>k;
  for(i=1;i<=n;i++)
  {
    cin >> a[i];
  }
pre();
pre1();
for(i=1;i<=k;i++)
{
  ll ans=0;
  for(j=0;j<=i;j++)
  {
    ans=(ans+((nck[i][j]*pow1[n][j])%mod*pow1[n][i-j])%mod)%mod;
  }
  ans=(ans-power(2,i)*pow1[n][i]%mod+mod)%mod;
  ans=(ans*power(2,mod-2))%mod;
  cout<<ans<<"\n";
}
 




}
#include<bits/stdc++.h>
using namespace std;

#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

/* // Ordered Set
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds;
template<typename T>
typedef tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update> ordered_set;
#define os_find(k) find_by_order(k)
#define os_order(k) order_of_key(k)
*/

typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<long long> vll;
#define f0(i,a,b) for(int i=a;i<b;i++)
#define f1(i,a,b) for(int i=a;i<=b;i++)
#define f2(i,a,b) for(int i=a;i>b;i--)
#define f3(i,a,b) for(int i=a;i>=b;i--)
#define all(a) a.begin(),a.end()
#define cntleadz(x) __builtin_clz(x) // or add ll at the end for long long
#define cnttrailz(x) __builtin_ctx(x)
#define cntpop(x) __builtin_popcount(x)
#define binparity(x) __builtin_parity(x)
#define pb push_back
#define pii pair<int,int>
#define int long long
#define fi first
#define se second
#define mod 998244353
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define make_graph(k) int x,y; f0(i,0,k){cin>>x>>y; adj[x].pb(y); adj[y].pb(x);}
#define test int t;cin>>t;while(t--)

int binExp(int x,int n)
{
    int res=1;
    while(n)
    {
        if(n&1) res=(res*x)%mod;
        x=(x*x)%mod;
        n>>=1;
    }
    return res;
}

int fact[301];
int modInv(int i) {return binExp(i,mod-2);}
int ncr(int n,int r) {return (n>=r?(fact[n]*modInv(fact[r]))%mod*modInv(fact[n-r])%mod:0);}


int powers[301][200001];
int sums[301];
int fin[301][200001];

signed main()
{
    fast

    #ifndef ONLINE_JUDGE
        freopen("inputf.txt","r",stdin);
        freopen("outputf.txt","w",stdout);
    #endif

    fact[0] = 1;
    f1(i,1,300) fact[i] = (fact[i-1] * i)%mod;

    int nn,k;
    cin>>nn>>k;

    int a[nn];
    f0(i,0,nn) cin>>a[i];

    f0(i,0,nn) powers[0][i] = 1;
    f1(i,1,k)
    {
        f0(j,0,nn)
        {
            powers[i][j] = (powers[i-1][j] * a[j])%mod;
        }
    }

    f1(i,0,k)
    {
        f0(j,0,nn)
        {
            sums[i] = (sums[i] + powers[i][j])%mod;
        }
    }

    // f1(i,0,k)
    // {
    //     cout<<sums[i]<<' ';
    // }
    // cout<<'\n';

    f1(i,1,k)
    {
        int ans = 0;
        f1(j,0,i/2)
        {
            ans = (ans + ncr(i,j) * ((sums[j] * sums[i-j] % mod - sums[i] + mod)%mod) % mod) % mod;
        }
        if((i&1) == 0)
        {
            int j = i/2;
            ans = (ans - ncr(i,j) * ((sums[j] * sums[i-j] % mod - sums[i] + mod)%mod * modInv(2) % mod) % mod + mod) % mod;
        }
        cout<<ans<<'\n';
    }
}