// Problem: D - Powers
// Contest: AtCoder - AtCoder Regular Contest 106
// URL: https://atcoder.jp/contests/arc106/tasks/arc106_d
// Memory Limit: 1024 MB
// Time Limit: 3000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define forn(i,x,n) for(int i = x;i <= n;++i)	

const int N = 2e5+7,M = 305,MOD = 998244353;
ll fx[M],fc[M],fsa[M],fsb[M];
int a[N],b[N];
ll fa[N][M],fb[N][M];
ll qmul(ll a, ll b, ll P) 
{
  	ll L = a * (b >> 25LL) % P * (1LL << 25) % P;
  	ll R = a * (b & ((1LL << 25) - 1)) % P;
  	return (L + R) % P;
}
ll qpow(ll a,ll b,ll p)
{
	ll res = 1 % p;
	while(b)
	{
		if(b & 1)	res = res * a % p;
		a = a * a % p;
		b >>= 1;
	}
	return res;
}
ll fact[N],infact[N];
void init()
{
    fact[0] = infact[0] = 1;
    for (int i = 1; i < N; i ++ )
    {
        fact[i] = ((ll)fact[i - 1] * i) % MOD;
        infact[i] = ((ll)infact[i - 1] * qpow(i, MOD - 2, MOD)) % MOD;
    }
}
ll C(int a,int b)
{
    return (ll)fact[a]*infact[b]%MOD*infact[a-b]%MOD;
}
int main()
{
	init();
	int n,k,rev2 = qpow(2,MOD - 2,MOD);scanf("%d%d",&n,&k);
    forn(i,1,n)	scanf("%d",&a[i]),b[i] = 2 * a[i];
	fsa[0] = n,fsb[0] = n;
	forn(i,1,n)
	{
		ll _a = 1,_b = 1;	
		forn(j,1,k)
		{
			_a = _a * a[i] % MOD,_b = _b * b[i] % MOD;
			fsa[j] = (fsa[j] + _a) % MOD,fsb[j] = (fsb[j] + _b) % MOD;
		}
	}
    
    forn(x,1,k)
    {
		ll lf = 0;
		forn(i,0,x)
		{
			ll t = fsa[i] * fsa[x - i] % MOD;
			t = t * C(x,i) % MOD;
			lf = (lf + t) % MOD;
		}
		// cout << lf << endl;
		lf = ((lf - fsb[x]) % MOD + MOD) % MOD;
		printf("%lld\n",rev2 * lf % MOD);
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long n , k , a [200005] , fact [303] , sum [303] , mn [303] , pww [200005][303] , pwww [200005][303];
long long pw ( long long x , long long y )
{
    if ( y == 0 ) return 1;
    long long ans = pw ( x , y / 2 );
    ans = ( ans * ans ) % mod;
    if ( y % 2 ) ans = ( ans * x ) % mod;
    return ans;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    cin >> n >> k;
    for ( int i = 0 ; i < n ; i ++ ) cin >> a [i];
    fact [0] = 1;
    for ( int i = 0 ; i < n ; i ++ )
    {
        pww [i][0] = 1;
        pwww [i][0] = 1;
    }
    for ( int i = 1 ; i <= k ; i ++ )
    {
        fact [i] = ( fact [ i - 1 ] * i ) % mod;
        for ( int j = 0 ; j < n ; j ++ )
        {
            pww [j][i] = ( pww [j][ i - 1 ] * a [j] ) % mod;
            pwww [j][i] = ( pwww [j][ i - 1 ] * ( a [j] + a [j] ) ) % mod;
            mn [i] += pwww [j][i];
        }
        mn [i] %= mod;
    }
    for ( int i = 0 ; i < n ; i ++ )
    {
        for ( int j = 0 ; j <= k ; j ++ ) sum [j] += pww [i][j];
    }
    for ( int i = 0 ; i <= k ; i ++ )
    {
        sum [i] %= mod;
        sum [i] = ( sum [i] * pw ( fact [i] , mod - 2 ) ) % mod;
    }
    for ( int i = 1 ; i <= k ; i ++ )
    {
        long long ans = 0;
        for ( int j = 0 ; j <= i ; j ++ ) ans += ( sum [j] * sum [ i - j ] ) % mod;
        ans %= mod;
        ans = ( ans * fact [i] ) % mod;
        ans = ( ans - mn [i] + mod ) % mod;
        cout << ( ans * pw ( 2 , mod - 2 ) ) % mod << endl;
    }
}
