#include <bits/stdc++.h>
using namespace std;
#define clr(a) memset(a, 0, sizeof(a))
#define full(a) memset(a, 0x3f, sizeof(a))
#define fornext(x, i) for(int i = head[x], y = ver[i]; i; i = nxt[i], y = ver[i])
#define mset(a, b) memset(a, b, sizeof(a))
#define Rep(i, a, b) for(int i = (a); i <= (b); ++i)
#define dRep(i, a, b) for(int i = (a); i >= (b); --i)
#define IOset(a) freopen(a".in", "r", stdin), freopen(a".out", "w", stdout);
#define endl '\n'
#define int ll
#define un unsigned
#define ll long long
#define db double
#define rept cerr<<1.0*clock()/CLOCKS_PER_SEC<<endl;
#define dbg cout<<"c "

template<typename _T>
inline void rd(_T &_d) {
	int _f; char _c;
	_f=_d=0;
	while(_c=getchar(),!isdigit(_c)) if (_c=='-') _f=1;
	while(isdigit(_c)) _d=_d*10+_c-'0',_c=getchar();
	if (_f) _d=-_d;
}

template <typename _T,typename ...Args>
inline void rd(_T &_d,Args &..._a) {
	rd(_d);
	rd(_a...);
}

#define mod(x) (x=(x>=M?x-M:x))
const int N=2e5+5,M=998244353;
int n,k,c[305][305],a[N],p[N][305],s[305];

signed main() {
	rd(n,k);
	Rep(i,1,n) rd(a[i]);
	Rep(i,0,k) c[i][0]=1;
	Rep(i,1,k) Rep(j,1,k) c[i][j]=c[i-1][j]+c[i-1][j-1],mod(c[i][j]);
	int tmp;
	Rep(i,1,n) {
		tmp=1;
		Rep(j,1,k) tmp=tmp*a[i]%M,s[j]+=tmp,mod(s[j]),p[i][j]=tmp;
	}
	Rep(i,1,n) p[i][0]=1;
	s[0]=n;
	int ans,inv=499122177;
	Rep(i,1,k) {
		ans=0;
		Rep(j,0,i) {
			ans=(ans+c[i][j]*s[j]%M*s[i-j]%M+M-s[i]*c[i][j]%M)%M;
		}
		cout<<ans*inv%M<<endl;
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
// @title mod int
#include <iostream>
using ll = long long;

#ifdef MUTABLE
int mod;
#else
template<int mod>
#endif
struct ModInt {
  int val;
  ModInt inv() const{
    int tmp,a=val,b=mod,x=1,y=0;
    while(b)tmp=a/b,a-=tmp*b,std::swap(a,b),x-=tmp*y,std::swap(x,y);
    return ModInt(x);
  }
  ModInt():val(0){}
  ModInt(ll x){if((val=x%mod)<0)val+=mod;}
  ModInt pow(ll t){ModInt res=1,b=*this; while(t){if(t&1)res*=b;b*=b;t>>=1;}return res;}
  ModInt& operator+=(const ModInt& x){if((val+=x.val)>=mod)val-=mod;return *this;}
  ModInt& operator-=(const ModInt& x){if((val+=mod-x.val)>=mod)val-=mod; return *this;}
  ModInt& operator*=(const ModInt& x){val=(ll)val*x.val%mod; return *this;}
  ModInt& operator/=(const ModInt& x){return *this*=x.inv();}
  bool operator==(const ModInt& x) const{return val==x.val;}
  bool operator!=(const ModInt& x) const{return val!=x.val;}
  bool operator<(const ModInt& x) const{return val<x.val;}
  bool operator<=(const ModInt& x) const{return val<=x.val;}
  bool operator>(const ModInt& x) const{return val>x.val;}
  bool operator>=(const ModInt& x) const{return val>=x.val;}
  ModInt operator+(const ModInt& x) const{return ModInt(*this)+=x;}
  ModInt operator-(const ModInt& x) const{return ModInt(*this)-=x;}
  ModInt operator*(const ModInt& x) const{return ModInt(*this)*=x;}
  ModInt operator/(const ModInt& x) const{return ModInt(*this)/=x;}
  friend std::ostream& operator<<(std::ostream& os, const ModInt& mi) { os << mi.val; return os; }
  static int get_mod() { return mod; }
};

#ifndef MUTABLE
using modint = ModInt<998244353>;
#endif

// @title 階乗、nPr、nCr
#include <vector>

template <int mod>
struct Factorial {
  using mint = ModInt<mod>;
  std::vector<modint> Fact, Finv;
public:
  Factorial(int _n): Fact(_n+1), Finv(_n+1) {
      Fact[0]=mint(1); for (int i = 0; i < _n; ++i) Fact[i+1]=Fact[i]*(i+1);
      Finv[_n]=mint(1)/Fact[_n]; for (int i = _n; i > 0; --i) Finv[i-1]=Finv[i]*i;
  }
  mint fact(int n,bool inv=0) { if (inv) return Finv[n]; else return Fact[n]; }
  mint nPr(int n,int r){ if (n<0||n<r||r<0) return mint(0); else return Fact[n]*Finv[n-r]; }
  mint nCr(int n,int r){ if (n<0||n<r||r<0) return mint(0); else return Fact[n]*Finv[r]*Finv[n-r]; }
};

using factorial = Factorial<998244353>;

int main() {
    int n, k; cin >> n >> k;
    vector<int> la(n);
    for (int i = 0; i < n; ++i) {
        cin >> la[i];
    }
    vector<modint> lp(k+1);
    lp[0] = n;
    for (int i = 0; i < n; ++i) {
        modint a = la[i];
        for (int x = 1; x <= k; ++x) {
            lp[x] += a.pow(x);
        }
    }
    factorial fact(1000);
    for (int x = 1; x <= k; ++x) {
        modint sum = 0;
        for (int i = 0; i <= x; ++i) {
            modint c = fact.nCr(x,i);
            sum += c*lp[i]*lp[x-i];
        }
        sum -= modint(2).pow(x)*lp[x];
        sum /= 2;
        cout << sum << endl;
        // cerr << x << " " << lp[x] << endl;
    }

    return 0;
}