#include <bits/stdc++.h>
using namespace std;
int gi() {
  char ch = '!';
  int res = 0, f = 0;
  while (ch < '0' || ch > '9') {
    ch = getchar();
    if (ch == '-') f = 1;
  }
  while (ch >= '0' && ch <= '9') res = res * 10 + ch - '0', ch = getchar();
  return res;
}
const int N = 20, mod = 998244353;
void inc(int &x, int y) { x += y, x = x >= mod ? x - mod : x; }
int qpow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = 1ll * res * x % mod;
    x = 1ll * x * x % mod, y >>= 1;
  }
  return res;
}
int n, K, C, fac[N], inv[N], ans[1 << 16];
int f[N][N][N][2], g[N][N];
vector<int> pot[N];
void solve(int id) {
  static int dp[N][N][2], tmp[N][N][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0] = 1;
  for (auto A : pot[id]) {
    memset(tmp, 0, sizeof(tmp));
    for (int p = 0; p <= K; ++p)
      for (int r = 0; r < 16; ++r)
        for (int o = 0; o < 2; ++o)
          if (dp[p][r][o])
            for (int q = 0; p + q <= K; ++q)
              inc(tmp[p + q][r ^ ((A - q) & 15)][o ^ ((A & 15) < q)],
                  1ll * dp[p][r][o] * inv[q] % mod);
    memcpy(dp, tmp, sizeof(tmp));
  }
  memcpy(f[id], dp, sizeof(dp));
}
void dfs(int x, int val) {
  if (x < 4) {
    for (int p = 0; p < 16; ++p) ans[val ^ p] = g[K][p];
    return;
  }
  int tmp[N][N];
  memset(tmp, 0, sizeof(tmp));
  for (int i = 0; i <= K; ++i)
    for (int j = 0; j < 16; ++j)
      if (g[i][j])
        for (int k = 0; i + k <= K; ++k)
          for (int p = 0; p < 16; ++p)
            inc(tmp[i + k][j ^ p], 1ll * g[i][j] * f[x][k][p][0] % mod);
  swap(g, tmp);
  dfs(x - 1, val);
  memcpy(g, tmp, sizeof(tmp));
  memset(tmp, 0, sizeof(tmp));
  for (int i = 0; i <= K; ++i)
    for (int j = 0; j < 16; ++j)
      if (g[i][j])
        for (int k = 0; i + k <= K; ++k)
          for (int p = 0; p < 16; ++p)
            inc(tmp[i + k][j ^ p], 1ll * g[i][j] * f[x][k][p][1] % mod);
  swap(g, tmp);
  dfs(x - 1, val ^ ((1 << (x + 1)) - 16));
  memcpy(g, tmp, sizeof(tmp));
}
int main() {
  n = gi(), K = gi(), C = gi();
  fac[0] = 1;
  for (int i = 1; i <= K; ++i) fac[i] = 1ll * fac[i - 1] * i % mod;
  inv[K] = qpow(fac[K], mod - 2);
  for (int i = K - 1; ~i; --i) inv[i] = 1ll * inv[i + 1] * (i + 1) % mod;
  int s = 0;
  g[0][0] = 1;
  for (int i = 1; i <= n; ++i) {
    int A = gi();
    s ^= A;
    if ((A & 15) < K)
      pot[__builtin_ctz(A - (A & 15))].push_back(A);
    else {
      static int dp[N][N];
      memset(dp, 0, sizeof(dp));
      for (int p = 0; p <= K; ++p)
        for (int r = 0; r < 16; ++r)
          if (g[p][r])
            for (int q = 0; p + q <= K; ++q)
              inc(dp[p + q][r ^ ((A - q) & 15)], 1ll * g[p][r] * inv[q] % mod);
      memcpy(g, dp, sizeof(dp));
    }
  }
  for (int i = 4; i < C; ++i) solve(i);
  dfs(C - 1, s - (s & 15));
  int iv = 1ll * fac[K] * qpow(n, mod - 1 - K) % mod;
  for (int i = 0; i < 1 << C; ++i) printf("%lld ", 1ll * ans[i] * iv % mod);
  puts("");
  return 0;
}
