#include <bits/stdc++.h>
int vv[(1 << 16) + 1], ff[(1 << 16) + 1], gg[(1 << 16) + 1], bcnt[(1 << 16)];
void init() {
  int i;
  ff[0] = gg[0] = 1;
  for (i = 1; i <= (1 << 16); i++) {
    vv[i] = i == 1 ? 1
                   : (long long)vv[i - 998244353 % i] * (998244353 / i + 1) %
                         998244353;
    ff[i] = (long long)ff[i - 1] * i % 998244353;
    gg[i] = (long long)gg[i - 1] * vv[i] % 998244353;
  }
  for (i = 1; i < (1 << 16); i++) bcnt[i] = bcnt[i & i - 1] + 1;
}
void wht(int *aa, int h) {
  if (h > 0) {
    int n = 1 << h, m = n >> 1, i, j;
    wht(aa, h - 1), wht(aa + m, h - 1);
    for (i = 0; (j = i + m) < n; i++) {
      int a = aa[i], b = aa[j];
      if ((aa[i] = a + b) >= 998244353) aa[i] -= 998244353;
      if ((aa[j] = a - b) < 0) aa[j] += 998244353;
    }
  }
}
int main() {
  static int cnt[16 + 1][1 << 4], dp[1 << 4][16 + 1][16 + 1][2][1 << 4],
      dq[16 + 1][2][1 << 4], dr[16 + 1][2][1 << 4], ans[16 + 1][(1 << 16)];
  int n, k_, h_, d, h, a, k, l, p, k1, p1, b, t, c, base, fv;
  init();
  scanf("%d%d%d", &n, &k_, &d);
  h_ = 0;
  while (1 << h_ < k_) h_++;
  fv = (long long)ff[k_] % 998244353;
  for (k = 0; k < k_; k++) fv = (long long)fv * vv[n] % 998244353;
  base = 0;
  while (n--) {
    scanf("%d", &a);
    base ^= a;
    h = h_;
    while (a >> h != a - k_ >> h) h++;
    cnt[h][a & (1 << h_) - 1]++;
  }
  for (a = 0; a < 1 << h_; a++) {
    dp[a][0][0][0][0] = 1;
    for (t = 1; t <= k_; t++)
      for (k = k_; k >= 0; k--)
        for (l = 0; l <= k; l++)
          for (p = 0; p < 2; p++)
            for (b = 0; b < 1 << h_; b++) {
              int x, y;
              if ((x = dp[a][k][l][p][b]) == 0) continue;
              y = 1;
              for (c = 1; k + c * t <= k_; c++) {
                int k_ = k + c * t, l_ = l + c, p_ = p ^ (a < t && c % 2 != 0),
                    b_ = b ^ (c % 2 == 0
                                  ? 0
                                  : a ^ (a >= t ? a - t : a - t + (1 << h_)));
                y = (long long)y * gg[t] % 998244353;
                dp[a][k_][l_][p_][b_] = (dp[a][k_][l_][p_][b_] +
                                         (long long)x * y % 998244353 * gg[c]) %
                                        998244353;
              }
            }
    for (k = 0; k <= k_; k++)
      for (l = 0; l <= k; l++)
        for (p = 0; p < 2; p++) wht(dp[a][k][l][p], h_);
  }
  for (h = h_; h <= d; h++) {
    if (h > h_)
      for (k = 0; k <= k_; k++)
        for (b = 0; b < 1 << h - 1; b++) ans[k][b | 1 << h - 1] = ans[k][b];
    else
      for (b = 0; b < 1 << h_; b++) ans[0][b] = 1;
    for (k = 0; k <= k_; k++)
      for (p = 0; p < 2; p++)
        for (b = 0; b < 1 << h_; b++) dr[k][p][b] = k == 0 && p == 0;
    for (a = 0; a < 1 << h_; a++) {
      for (k = 0; k <= k_; k++)
        for (p = 0; p < 2; p++)
          for (b = 0; b < 1 << h_; b++) {
            int x = 0;
            for (l = 1; l <= k && l <= cnt[h][a]; l++)
              x = (x + (long long)dp[a][k][l][p][b] * gg[cnt[h][a] - l] %
                           998244353 * ff[cnt[h][a]]) %
                  998244353;
            dq[k][p][b] = x;
          }
      for (k = k_; k >= 0; k--)
        for (p = 0; p < 2; p++)
          for (k1 = 1; k + k1 <= k_; k1++)
            for (p1 = 0; p1 < 2; p1++) {
              int k_ = k + k1, p_ = p ^ p1;
              for (b = 0; b < 1 << h_; b++)
                dr[k_][p_][b] =
                    (dr[k_][p_][b] + (long long)dr[k][p][b] * dq[k1][p1][b]) %
                    998244353;
            }
    }
    for (k = k_; k >= 0; k--)
      for (k1 = 1; k + k1 <= k_; k1++)
        for (p = 0; p < 2; p++) {
          int k_ = k + k1;
          for (b = 0; b < 1 << h; b++)
            ans[k_][b] =
                (ans[k_][b] + (long long)ans[k][b] *
                                  dr[k1][p][b & (1 << h_) - 1] % 998244353 *
                                  (bcnt[b >> h_] % 2 == 0 || p % 2 == 0
                                       ? 1
                                       : 998244353 - 1)) %
                998244353;
        }
  }
  wht(ans[k_], d);
  for (b = 0; b < 1 << d; b++)
    ans[k_][b] = (long long)ans[k_][b] * vv[1 << d] % 998244353;
  for (b = 0; b < 1 << d; b++)
    printf("%lld ", (long long)ans[k_][base ^ b] * fv % 998244353);
  printf("\n");
  return 0;
}
