#include "bits/stdc++.h"
using namespace std;

#define FAST ios_base::sync_with_stdio(false); cin.tie(0);
#define pb push_back
#define eb emplace_back
#define ins insert
#define f first
#define s second
#define cbr cerr<<"hi\n"
#define mmst(x, v) memset((x), v, sizeof ((x)))
#define siz(x) ll(x.size())
#define all(x) (x).begin(), (x).end()
#define lbd(x,y) (lower_bound(all(x),y)-x.begin())
#define ubd(x,y) (upper_bound(all(x),y)-x.begin())
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());    //can be used by calling rng() or shuffle(A, A+n, rng)
inline long long rand(long long x, long long y) { return rng() % (y+1-x) + x; } //inclusivesss
string inline to_string(char c) {string s(1,c);return s;} template<typename T> inline T gcd(T a,T b){ return a==0?llabs(b):gcd(b%a,a); }

using ll=long long; 
using ld=long double;
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e) for(ll i=s;i>=ll(e);--i)
using pi=pair<ll,ll>; using spi=pair<ll,pi>; using dpi=pair<pi,pi>; 

#define LLINF ((long long)1e18)
#define INF int(1e9+1e6)
#define MAXN (200006)
ll n,k,A[MAXN],C[302][302],mod=998244353,sum[MAXN],ans[302],co[MAXN];
ll qexp(ll x,ll e){
	ll sum=1;
	for(;e;e>>=1,x*=x,x%=mod)if(e&1)sum*=x,sum%=mod;
	return sum;
}
int main(){
	FAST
	cin>>n>>k;
	FOR(i,1,n)cin>>A[i];
	FOR(i,0,300) C[i][0]=1;
	FOR(i,1,300) FOR(j,1,300) C[i][j] = (C[i-1][j] + C[i-1][j-1]) % mod;
	FOR(i,1,n){
		ll co = 1;
		FOR(j,0,k){
			sum[j] += co, sum[j] %= mod;
			co *= A[i], co %= mod;
		}
	}
	fill(co,co+MAXN,1);
	FOR(i,1,k){
		ll ans = 0;
		FOR(j,0,i){
			ans += sum[j] * sum[i-j] % mod * C[i][j] % mod, ans %= mod;
		}
		FOR(z,1,n){
			co[z] *= A[z] * 2 % mod, co[z] %= mod;
			ans -= co[z], ans += mod, ans %= mod;
		}
		ans *= qexp(2, mod-2), ans %= mod;
		cout<<ans<<'\n';
	}
}

#include "bits/stdc++.h" // Tomasz Nowak
using namespace std;     // XIII LO Szczecin
using LL = long long;    // Poland
#define FOR(i, l, r) for(int i = (l); i <= (r); ++i)
#define REP(i, n) FOR(i, 0, (n) - 1)
template<class T> int size(T &&x) {
	return int(x.size());
}
template<class A, class B> ostream& operator<<(ostream &out, const pair<A, B> &p) {
	return out << '(' << p.first << ", " << p.second << ')';
}
template<class T> auto operator<<(ostream &out, T &&x) -> decltype(x.begin(), out) {
	out << '{';
	for(auto it = x.begin(); it != x.end(); ++it)
		out << *it << (it == prev(x.end()) ? "" : ", ");
	return out << '}';
}
void dump() {}
template<class T, class... Args> void dump(T &&x, Args... args) {
	cerr << x << ";  ";
	dump(args...);
}
#ifdef DEBUG
  struct Nl{~Nl(){cerr << '\n';}};
# define debug(x...) cerr << (strcmp(#x, "") ? #x ":  " : ""), dump(x), Nl(), cerr << ""
#else
# define debug(...) 0 && cerr
#endif
mt19937_64 rng(0);
int rd(int l, int r) {
	return uniform_int_distribution<int>(l, r)(rng);
}
// end of templates

constexpr int mod = int(998244353);
int mul(int a, int b) {
	return int((a * LL(b)) % mod);
}
int add(int a, int b) {
	a += b;
	if(a >= mod)
		a -= mod;
	return a;
}
int pot(int a, int b) {
	if(b == 0)
		return 1;
	int x = pot(a, b / 2);
	x = mul(x, x);
	if(b & 1)
		x = mul(x, a);
	return x;
}
int inv(int x) {
	return pot(x, mod - 2);
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int n, K;
	cin >> n >> K;
	vector<int> a(n);
	for(int &ai : a)
		cin >> ai;

	vector<int> silnia(K + 1, 1);
	FOR(i, 2, K)
		silnia[i] = mul(silnia[i - 1], i);
	vector<int> revsilnia(K + 1, 1);
	revsilnia[K] = inv(silnia[K]);
	for(int i = K - 1; i >= 2; --i)
		revsilnia[i] = mul(revsilnia[i + 1], i + 1);
	auto newton = [&](int x, int y) {
		return mul(silnia[x], mul(revsilnia[y], revsilnia[x - y]));
	};

	vector<int> sum_pot(K + 1);
	FOR(k, 0, K)
		REP(i, n)
			sum_pot[k] = add(sum_pot[k], pot(a[i], k));
	debug(sum_pot);

	/*
	vector<int> sum_2a_pot(K + 1);
	FOR(k, 1, K)
		REP(i, n)
			sum_2a_pot[k] = add(sum_2a_pot[k], pot(2 * a[i], k));
	*/

	int inv2 = inv(2);

	FOR(k, 1, K) {
		int answer = 0;
		FOR(x, 0, k) {
			int nw = newton(k, x);
			int local = mul(sum_pot[x], sum_pot[k - x]);
			local = add(local, mod - sum_pot[k]);
			local = mul(local, inv2);
			debug(x, k - x, k, nw, local);
			answer = add(answer, mul(nw, local));
		}
		cout << answer << '\n';
	}
}
