#include <bits/stdc++.h>
#pragma GCC optimize(4)
#pragma GCC optimize("Ofast")
using namespace std;
const int maxn = 1e5 + 5, mod = 998244353;
int _builtin_ctz(int x) {
  for (int i = 20; i >= 4; i--)
    if (x & (1 << i)) return i + 1;
  return 0;
}
int qpow(int x, int k) {
  int rs = 1;
  while (k) {
    if (k & 1) rs = (long long)rs * x % mod;
    x = (long long)x * x % mod, k >>= 1;
  }
  return rs;
}
void fwt(int* f, int lim, int t) {
  for (int mid = 1; mid < lim; mid <<= 1)
    for (int R = (mid << 1), j = 0; j < lim; j += R)
      for (int k = 0; k < mid; k++) {
        f[j + k] = (f[j + k] + f[j + mid + k]) % mod;
        f[j + mid + k] =
            ((long long)f[j + k] - f[j + mid + k] - f[j + mid + k]) % mod;
        f[j + k] = (long long)f[j + k] * t % mod,
              f[j + mid + k] = (long long)f[j + mid + k] * t % mod;
      }
}
int n, k, c, a[maxn], b[17][maxn], tp[17], fs[17] = {1};
int d[maxn], f[18][17][maxn], nf[17][maxn];
void work(int id) {
  f[id][0][0] = 1;
  int ef = (1 << id) - (1 << 4);
  for (int i = 1; i <= tp[id]; i++) {
    for (int j = 0; j <= k; j++) d[j] = (b[id][i] ^ (b[id][i] - j));
    for (int p = 0; p <= k; p++)
      for (int S = 0; S <= 15; S++)
        for (int j = 0; j <= k - p; j++)
          nf[p + j][S ^ d[j]] =
              (nf[p + j][S ^ d[j]] + (long long)f[id][p][S] * fs[j]) % mod;
    if (id > 4)
      for (int p = 0; p <= k; p++)
        for (int S = 0; S <= 15; S++)
          for (int j = 0; j <= k - p; j++)
            nf[p + j][S ^ d[j] ^ ef] = (nf[p + j][S ^ d[j] ^ ef] +
                                        (long long)f[id][p][S ^ ef] * fs[j]) %
                                       mod;
    for (int p = 0; p <= k; p++)
      for (int S = 0; S <= 15; S++) f[id][p][S] = nf[p][S], nf[p][S] = 0;
    if (id > 4)
      for (int p = 0; p <= k; p++)
        for (int S = 0; S <= 15; S++)
          f[id][p][S ^ ef] = nf[p][S ^ ef], nf[p][S ^ ef] = 0;
  }
}
int F[17][maxn], nF[17][maxn];
void Merge(int id) {
  if (tp[id] == 0) return;
  for (int i = 0; i <= k; i++) fwt(f[id][i], 1 << c, 1), fwt(F[i], 1 << c, 1);
  for (int p = 0; p <= k; p++)
    for (int q = 0; q <= k - p; q++)
      for (int j = 0; j < (1 << c); j++) {
        nF[p + q][j] = (nF[p + q][j] + (long long)F[p][j] * f[id][q][j]) % mod;
      }
  for (int i = 0; i <= k; i++) fwt(nF[i], 1 << c, qpow(2, mod - 2));
  memcpy(F, nF, sizeof nF), memset(nF, 0, sizeof nF);
}
int ans[maxn];
signed main() {
  scanf("%d%d%d", &n, &k, &c);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  for (int i = 1; i <= k; i++)
    fs[i] = (long long)fs[i - 1] * qpow(i, mod - 2) % mod;
  for (int i = 1, x; i <= n; i++) {
    x = _builtin_ctz((a[i] ^ (a[i] - k))), b[x][++tp[x]] = a[i];
  }
  F[0][0] = 1;
  for (int i = 0; i <= 17; i++) work(i);
  for (int i = 0; i <= 17; i++) Merge(i);
  int ttp = 0;
  for (int i = 1; i <= n; i++) ttp = ttp ^ a[i];
  int tmp = qpow(qpow(n, mod - 2), k);
  for (int i = 1; i <= k; i++) tmp = (long long)tmp * i % mod;
  for (int i = 0; i < (1 << c); i++)
    ans[i ^ ttp] = (long long)tmp * F[k][i] % mod;
  for (int i = 0; i < (1 << c); i++) printf("%d ", (ans[i] + mod) % mod);
  return 0;
}
