#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 16;
const int mod = 998244353;
long long modpow(long long x, long long h) {
  long long res = 1;
  for (; h; h >>= 1) {
    if (h & 1) res = res * x % mod;
    x = x * x % mod;
  }
  return res;
}
long long inverse(long long x) { return modpow(x, mod - 2); }
int n, k, c;
vector<int> vt[20];
long long dp[20][N], C[20][20];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k >> c;
  int val = 0;
  for (int i = 1, x; i <= n; ++i) {
    cin >> x;
    int tmp = x ^ (x - k);
    int d = 0;
    while (tmp) {
      tmp >>= 1;
      d++;
    }
    vt[d].emplace_back(x);
    val ^= x;
  }
  for (int i = 0; i <= k; ++i) {
    C[0][i] = 1;
    for (int j = 1; j <= i; ++j) C[j][i] = C[j][i - 1] + C[j - 1][i - 1];
  }
  dp[0][0] = 1;
  for (int i = 1; i <= c; ++i)
    for (int x : vt[i]) {
      int mx = (1 << i) - 1;
      x &= mx;
      for (int sl = k - 1; sl >= 0; --sl)
        for (int add = 1; add <= k - sl; ++add) {
          int change = x ^ (x - add), nsl = sl + add;
          long long cof = C[add][k - sl];
          for (int mask = 0; mask <= mx; ++mask)
            dp[nsl][mask] = (dp[nsl][mask] + dp[sl][mask ^ change] * cof) % mod;
        }
    }
  for (int i = 0; i < (1 << c); ++i)
    if (i < (i ^ val)) swap(dp[k][i], dp[k][i ^ val]);
  long long inv = inverse(modpow(n, k));
  for (int i = 0; i < (1 << c); ++i) cout << dp[k][i] * inv % mod << " ";
  return 0;
}
