#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int MAXN = (1 << 17) + 10;
int64_t poww(int64_t a, int64_t b) {
  int64_t ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % MOD;
    b >>= 1;
    a = (a * a) % MOD;
  }
  return ans;
}
void add(int &a, int b) { a = (a + b) % MOD; }
const int MAXK = 17;
int n, k, c;
int C[60][60] = {0};
int32_t main() {
  ios_base::sync_with_stdio(false);
  for (int i = (0); i < (60); i++) {
    C[i][0] = C[i][i] = 1;
    for (int j = (1); j < (i); j++)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
  }
  cin >> n >> k >> c;
  vector<vector<int> > nums(c + 1);
  int base = 0;
  for (int i = (0); i < (n); i++) {
    int first;
    cin >> first;
    base ^= first;
    for (int j = (0); j < (c + 1); j++) {
      int mask = (1 << j) - 1;
      if ((first & mask) >= k) {
        nums[j].push_back(first & mask);
        break;
      }
    }
  }
  int sz = 1 << c;
  vector<vector<int> > dp(k + 1, vector<int>(sz, 0));
  dp[0][0] = 1;
  for (int r = (0); r < (c + 1); r++) {
    sort(nums[r].begin(), nums[r].end());
    for (auto first : nums[r]) {
      for (int i = (k + 1) - 1; i >= (0); i--) {
        for (int a = (0); a < ((1 << r)); a++) {
          if (dp[i][a] == 0) continue;
          for (int j = (1); j < (k + 1); j++) {
            if (i + j > k) break;
            add(dp[i + j][a ^ first ^ (first - j)],
                1LL * dp[i][a] * C[i + j][j] % MOD);
          }
        }
      }
    }
  }
  int inv = poww(poww(n, k), MOD - 2);
  for (int i = (0); i < (sz); i++) {
    int v = 1LL * dp[k][i ^ base] * inv % MOD;
    cout << v << " ";
  }
  cout << endl;
  return 0;
}
