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

#define all(v) v.begin(), v.end()
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep_up(i, a, b) for (ll i = a; i < b; ++i)
#define rep_down(i, a, b) for (ll i = a; i > b; --i)

#define P pair<ll, ll>
#define Graph vector<vector<ll>>
#define fi first
#define se second

#define vvvvll vector<vector<vector<vector<ll>>>>
#define vvvll vector<vector<vector<ll>>>
#define vvll vector<vector<ll>>
#define vll vector<ll>

#define vvvvdo vector<vector<vector<vector<double>>>>
#define vvvdo vector<vector<vector<double>>>
#define vvdo vector<vector<double>>
#define vdo vector<double>

#define pqll priority_queue<ll>
#define pqllg priority_queue<ll, vector<ll>, greater<ll>>

constexpr ll INF = (1ll << 60);
constexpr ll mod = 998244353;
// constexpr ll mod = 67280421310721;
// constexpr ll mod = 1000000007;
constexpr double pi = 3.14159265358979323846;
template <typename T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
void pt_vll(vector<T> &v) {
    ll vs = v.size();
    rep(i, vs) {
        cout << v[i];
        if (i == vs - 1)
            cout << "\n";
        else
            cout << " ";
    }
}
template <typename T>
void pt_vvll(vector<vector<T>> &v) {
    ll vs = v.size();
    rep(i, vs) pt_vll(v[i]);
}
template <typename T>
void pt(T val) {
    cout << val << "\n";
}

ll gcd(ll a, ll b) {
    if (a % b == 0) return b;
    return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

ll modpow(ll x, ll n) {
    ll ret = 1;
    while (n > 0) {
        if (n & 1)
            ret = ret * x % mod;  // n の最下位bitが 1 ならば x^(2^i) をかける
        x = x * x % mod;
        n >>= 1;  // n を1bit 左にずらす
    }
    return ret;
}
ll minv(ll a, ll m) { return modpow(a, m - 2); }
void pre_process(vector<ll> &a, vector<ll> &s) {  //累積和のvector
    ll n = (ll)a.size();
    s.assign(n + 1, 0);
    for (ll i = 0; i < n; i++) {
        s[i + 1] = s[i] + a[i];
        s[i + 1] %= mod;
    }
}
#define MAX 1000100
ll fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++) {
        fac[i] = fac[i - 1] * i % mod;
        inv[i] = mod - inv[mod % i] * (mod / i) % mod;
        finv[i] = finv[i - 1] * inv[i] % mod;
    }
}
// 二項係数計算
ll combi(ll n, ll k) {
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
// mainに   COMinit();   を入れる
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    COMinit();

    ll N, K;
    cin >> N >> K;
    vll A(N);
    rep(i, N) cin >> A[i];

    vvll mp(K + 1, vll(N)), sp(K + 1);

    rep(i, K + 1) {
        rep(j, N) { mp[i][j] = modpow(A[j], i); }
    }

    rep(i, K + 1) { pre_process(mp[i], sp[i]); }

    rep_up(X, 1, K + 1) {
        ll ans = 0;
        rep(k, X + 1) {
            ll m1 = (sp[k][N] * sp[X - k][N]) % mod;
            ll m2 = combi(X, k);

            (ans += (m1 * m2) % mod) %= mod;
        }

        ((ans -= (modpow(2, X) * sp[X][N]) % mod) += 100 * mod) %= mod;

        ans *= minv(2, mod);
        ans %= mod;
        (ans += 100 * mod) %= mod;

        pt(ans);
    }
    return 0;
}
/* include */
#include <bits/stdc++.h>
using namespace std;
/* definition */
#define _GLIBCXX_DEBUG
#define rep(i, N) for (ll i = 0; i < (ll)(N); i++)
#define repp(i, N) for (ll i = 1; i <= (ll)(N); i++)
#define pb(n) push_back(n)
#define all(v) (v).begin(), (v).end()
#define co(ans) cout << (ans) 
#define fin << endl
#define enter cout << endl
#define ll long long
#define spr(i) cout << fixed << setprecision((ll)(i))
#define lmax 9223372036854775807
#define lmin -9223372036854775807
#define pi 3.1415926535897932384626433832795028
/* own maid function */
ll ctol(char c){
  if(c == '0')return 0;
  else if(c == '1')return 1;
  else if(c == '2')return 2;
  else if(c == '3')return 3;
  else if(c == '4')return 4;
  else if(c == '5')return 5;
  else if(c == '6')return 6;
  else if(c == '7')return 7;
  else if(c == '8')return 8;
  else if(c == '9')return 9;
  else return -1;
}
ll gcd(ll a, ll b){
  return b ? gcd(b, a % b ) : a;
}
ll lcm(ll a, ll b){
  return a / gcd(a, b) * b;
}
bool isPrime(ll x){
  ll i;
  if (x < 2)
    return 0;
  else if (x == 2)
    return 1;
  if (x % 2 == 0)
    return 0;
  for (i = 3; i * i <= x; i += 2)
    if (x % i == 0)
      return 0;
  return 1;
}
ll digsum(ll n){
  ll res = 0;
  while (n > 0)
  {
    res += n % 10;
    n /= 10;
  }
  return res;
}
ll dignum(ll n){
  ll res = 0;
  while (n > 0)
  {
    res += n % 10;
    n++;
  }
  return res;
}
vector<ll> enum_div(ll n){
  vector<ll> ret;
  for (ll i = 1; i * i <= n; ++i)
  {
    if (n % i == 0)
    {
      ret.push_back(i);
      if (i != 1 && i * i != n)
      {
        ret.push_back(n / i);
      }
    }
  }
  return ret;
}
ll stringcount(string s, char c){
  return count(s.cbegin(), s.cend(), c);
}
/*
vector<> ();
vector<vector<>> (, vector<>(, ));
vector<vector<vector<>>> (, vector<vector<>>(, vector<>(, )));
*/
/* cins */
ll cinl(){ll l; cin >> l; return l;}
double cind(){double d; cin >> d; return d;}
char cinc(){char c; cin >> c; return c;}
string cins(){string s; cin >> s; return s;}
/* function */

/* main */
int main(void){
  ll A = cinl(), B = cinl(), C = cinl();
  ll a, b, c;
  a = A * (A+1) / 2;
  b = B * (B+1) / 2;
  c = C * (C+1) / 2;
  a %= 998244353;
  b %= 998244353;
  c %= 998244353;
  co((a*b%998244353)*c%998244353) fin;
}
/* fin */