Problem: You are given a positive integer k and an array a_1, a_2, …, a_n of non-negative distinct integers not smaller than k and not greater than 2^c-1.

In each of the next k seconds, one element is chosen randomly equiprobably out of all n elements and decreased by 1.

For each integer x, 0 ≤ x ≤ 2^c - 1, you need to find the probability that in the end the bitwise XOR of all elements of the array is equal to x. 

Each of these values can be represented as an irreducible fraction p/q, and you need to find the value of p ⋅ q^{-1} modulo 998 244 353. 

Input

The first line of input contains three integers n, k, c (1 ≤ n ≤ (2^c - k), 1 ≤ k ≤ 16, 1 ≤ c ≤ 16).

The second line contains n distinct integers a_1, a_2, …, a_n (k ≤ a_i ≤ 2^c-1).

Output

Print 2^c integers: the probability that the bitwise XOR is equal to x in the end for x in \{0, 1, …, 2^c-1\} modulo 998 244 353.

Example

Input


4 1 3
1 2 3 4


Output


0 0 0 748683265 0 499122177 0 748683265 

Solution (in CPP):

Solution:
#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], ans[16 + 1][(1 << 16)];
  int n, k_, h_, d, h, a, k, l, p, k1, l1, 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++) dq[k][p][b] = k == 0 && p == 0;
    for (a = 0; a < 1 << h_; a++)
      for (k = k_; k >= 0; k--)
        for (p = 0; p < 2; p++)
          for (k1 = 1; k + k1 <= k_; k1++)
            for (l1 = 1; l1 <= k1 && l1 <= cnt[h][a]; l1++) {
              int x = (long long)gg[cnt[h][a] - l1] * ff[cnt[h][a]] % 998244353;
              for (p1 = 0; p1 < 2; p1++) {
                int k_ = k + k1, p_ = p ^ p1;
                for (b = 0; b < 1 << h_; b++)
                  dq[k_][p_][b] = (dq[k_][p_][b] + (long long)dq[k][p][b] *
                                                       dp[a][k1][l1][p1][b] %
                                                       998244353 * x) %
                                  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] *
                                  dq[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;
}