#include <bits/stdc++.h>
using namespace std;
const int M = 18, N = (1 << (M - 1)), mod = 998244353;
int qpow(int x, int y = mod - 2) {
  int res = 1;
  for (; y; x = (long long)x * x % mod, y >>= 1)
    if (y & 1) res = (long long)res * x % mod;
  return res;
}
int n, k, c, fac[N], ifac[N], inv[N], all;
void init(int x) {
  fac[0] = ifac[0] = inv[1] = 1;
  for (int i = (2); i <= (x); i++)
    inv[i] = (long long)inv[mod % i] * (mod - mod / i) % mod;
  for (int i = (1); i <= (x); i++)
    fac[i] = (long long)fac[i - 1] * i % mod,
    ifac[i] = (long long)ifac[i - 1] * inv[i] % mod;
}
struct node {
  int f[M];
} s[N];
int cnt[N], tot, fs = 1;
bool operator<(node a, node b) {
  for (int i = (0); i <= (k); i++)
    if (a.f[i] ^ b.f[i]) return a.f[i] < b.f[i];
  return false;
}
map<node, int> mp;
int a[N], ns[N], ln[N][M], v[N], g[N];
void Exp(int *f, int len) {
  g[0] = 1;
  for (int i = (1); i <= (len - 1); i++)
    for (int j = (1); j <= (i); j++)
      (g[i] += (long long)g[i - j] * f[j] % mod * j % mod * inv[i] % mod) %=
          mod;
  for (int i = (0); i <= (len - 1); i++) f[i] = g[i], g[i] = 0;
}
void Ln(int *f, int len) {
  g[0] = 0;
  for (int i = (1); i <= (len - 1); i++) {
    g[i] = f[i];
    for (int j = (1); j <= (i - 1); j++)
      (g[i] +=
       mod - (long long)g[j] * f[i - j] % mod * j % mod * inv[i] % mod) %= mod;
  }
  for (int i = (0); i <= (len - 1); i++) f[i] = g[i], g[i] = 0;
}
void IFWT(int *f, int len) {
  for (int i = 2; i <= len; i <<= 1)
    for (int j = 0, l = (i >> 1); j < len; j += i)
      for (int k = j; k < j + l; k++) {
        int pa = f[k], pb = f[k + l];
        f[k] = (pa + pb) % mod, f[k + l] = (pa + mod - pb) % mod;
      }
  for (int i = (0); i <= (len - 1); i++)
    f[i] = (long long)f[i] * inv[len] % mod;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k >> c, init(max(max(n, k), 1 << c) + 5);
  for (int i = (1); i <= (n); i++) {
    cin >> a[i], all ^= a[i];
    node w;
    for (int j = (0); j <= (k); j++) w.f[j] = (a[i] ^ (a[i] - j));
    mp[w]++;
  }
  for (auto w : mp) ++tot, s[tot] = w.first, cnt[tot] = w.second;
  for (int i = (0); i <= ((1 << (k + 1)) - 1); i++) {
    for (int j = (0); j <= (k); j++)
      ln[i][j] = ((i >> j & 1) ? mod - ifac[j] : ifac[j]);
    Ln(ln[i], k + 1);
  }
  for (int i = (0); i <= ((1 << c) - 1); i++) {
    for (int j = (0); j <= (k); j++) v[j] = 0;
    for (int j = (1); j <= (tot); j++) {
      int msk = 0;
      for (int t = (0); t <= (k); t++)
        if (__builtin_parity(i & s[j].f[t])) msk |= (1 << t);
      for (int t = (0); t <= (k); t++)
        (v[t] += (long long)ln[msk][t] * cnt[j] % mod) %= mod;
    }
    Exp(v, k + 1), ns[i] = v[k];
  }
  IFWT(ns, 1 << c);
  for (int i = (1); i <= (k); i++) fs = (long long)fs * inv[n] % mod;
  for (int i = (0); i <= ((1 << c) - 1); i++)
    cout << (long long)ns[all ^ i] * fs % mod * fac[k] % mod << " ";
  cout << "\n";
  return 0;
}
