#include <bits/stdc++.h>
#pragma GCC optimize(4)
#pragma GCC optimize("Ofast")
using namespace std;
const int maxn = 1e5 + 5, mod = 998244353;
int _builtin_ctz(int x) {
  for (int i = 20; i >= 4; i--)
    if (x & (1 << i)) return i + 1;
  return 0;
}
int qpow(int x, int k) {
  int rs = 1;
  while (k) {
    if (k & 1) rs = (long long)rs * x % mod;
    x = (long long)x * x % mod, k >>= 1;
  }
  return rs;
}
void fwt(int* f, int lim, int t) {
  for (int mid = 1; mid < lim; mid <<= 1)
    for (int R = (mid << 1), j = 0; j < lim; j += R)
      for (int k = 0; k < mid; k++) {
        f[j + k] = (f[j + k] + f[j + mid + k]) % mod;
        f[j + mid + k] =
            ((long long)f[j + k] - f[j + mid + k] - f[j + mid + k]) % mod;
        f[j + k] = (long long)f[j + k] * t % mod,
              f[j + mid + k] = (long long)f[j + mid + k] * t % mod;
      }
}
int n, k, c, a[maxn], b[17][maxn], tp[17], fs[17] = {1};
int d[maxn], f[18][17][maxn], nf[17][maxn];
void work(int id) {
  f[id][0][0] = 1;
  int ef = (1 << id) - (1 << 4);
  for (int i = 1; i <= tp[id]; i++) {
    for (int j = 0; j <= k; j++) d[j] = (b[id][i] ^ (b[id][i] - j));
    for (int p = 0; p <= k; p++)
      for (int S = 0; S <= 15; S++)
        for (int j = 0; j <= k - p; j++)
          nf[p + j][S ^ d[j]] =
              (nf[p + j][S ^ d[j]] + (long long)f[id][p][S] * fs[j]) % mod;
    if (id > 4)
      for (int p = 0; p <= k; p++)
        for (int S = 0; S <= 15; S++)
          for (int j = 0; j <= k - p; j++)
            nf[p + j][S ^ d[j] ^ ef] = (nf[p + j][S ^ d[j] ^ ef] +
                                        (long long)f[id][p][S ^ ef] * fs[j]) %
                                       mod;
    for (int p = 0; p <= k; p++)
      for (int S = 0; S <= 15; S++) f[id][p][S] = nf[p][S], nf[p][S] = 0;
    if (id > 4)
      for (int p = 0; p <= k; p++)
        for (int S = 0; S <= 15; S++)
          f[id][p][S ^ ef] = nf[p][S ^ ef], nf[p][S ^ ef] = 0;
  }
}
int F[17][maxn], nF[17][maxn];
void Merge(int id) {
  if (tp[id] == 0) return;
  for (int i = 0; i <= k; i++) fwt(f[id][i], 1 << c, 1), fwt(F[i], 1 << c, 1);
  for (int p = 0; p <= k; p++)
    for (int q = 0; q <= k - p; q++)
      for (int j = 0; j < (1 << c); j++) {
        nF[p + q][j] = (nF[p + q][j] + (long long)F[p][j] * f[id][q][j]) % mod;
      }
  for (int i = 0; i <= k; i++) fwt(nF[i], 1 << c, qpow(2, mod - 2));
  memcpy(F, nF, sizeof nF), memset(nF, 0, sizeof nF);
}
int ans[maxn];
signed main() {
  scanf("%d%d%d", &n, &k, &c);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  for (int i = 1; i <= k; i++)
    fs[i] = (long long)fs[i - 1] * qpow(i, mod - 2) % mod;
  for (int i = 1, x; i <= n; i++) {
    x = _builtin_ctz((a[i] ^ (a[i] - k))), b[x][++tp[x]] = a[i];
  }
  F[0][0] = 1;
  for (int i = 0; i <= 17; i++) work(i);
  for (int i = 0; i <= 17; i++) Merge(i);
  int ttp = 0;
  for (int i = 1; i <= n; i++) ttp = ttp ^ a[i];
  int tmp = qpow(qpow(n, mod - 2), k);
  for (int i = 1; i <= k; i++) tmp = (long long)tmp * i % mod;
  for (int i = 0; i < (1 << c); i++)
    ans[i ^ ttp] = (long long)tmp * F[k][i] % mod;
  for (int i = 0; i < (1 << c); i++) printf("%d ", (ans[i] + mod) % mod);
  return 0;
}

### Prompt

Construct a Cpp code solution to the problem outlined:

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 

### Response

```cpp
#include <bits/stdc++.h>
#pragma GCC optimize(4)
#pragma GCC optimize("Ofast")
using namespace std;
const int maxn = 1e5 + 5, mod = 998244353;
int _builtin_ctz(int x) {
  for (int i = 20; i >= 4; i--)
    if (x & (1 << i)) return i + 1;
  return 0;
}
int qpow(int x, int k) {
  int rs = 1;
  while (k) {
    if (k & 1) rs = (long long)rs * x % mod;
    x = (long long)x * x % mod, k >>= 1;
  }
  return rs;
}
void fwt(int* f, int lim, int t) {
  for (int mid = 1; mid < lim; mid <<= 1)
    for (int R = (mid << 1), j = 0; j < lim; j += R)
      for (int k = 0; k < mid; k++) {
        f[j + k] = (f[j + k] + f[j + mid + k]) % mod;
        f[j + mid + k] =
            ((long long)f[j + k] - f[j + mid + k] - f[j + mid + k]) % mod;
        f[j + k] = (long long)f[j + k] * t % mod,
              f[j + mid + k] = (long long)f[j + mid + k] * t % mod;
      }
}
int n, k, c, a[maxn], b[17][maxn], tp[17], fs[17] = {1};
int d[maxn], f[18][17][maxn], nf[17][maxn];
void work(int id) {
  f[id][0][0] = 1;
  int ef = (1 << id) - (1 << 4);
  for (int i = 1; i <= tp[id]; i++) {
    for (int j = 0; j <= k; j++) d[j] = (b[id][i] ^ (b[id][i] - j));
    for (int p = 0; p <= k; p++)
      for (int S = 0; S <= 15; S++)
        for (int j = 0; j <= k - p; j++)
          nf[p + j][S ^ d[j]] =
              (nf[p + j][S ^ d[j]] + (long long)f[id][p][S] * fs[j]) % mod;
    if (id > 4)
      for (int p = 0; p <= k; p++)
        for (int S = 0; S <= 15; S++)
          for (int j = 0; j <= k - p; j++)
            nf[p + j][S ^ d[j] ^ ef] = (nf[p + j][S ^ d[j] ^ ef] +
                                        (long long)f[id][p][S ^ ef] * fs[j]) %
                                       mod;
    for (int p = 0; p <= k; p++)
      for (int S = 0; S <= 15; S++) f[id][p][S] = nf[p][S], nf[p][S] = 0;
    if (id > 4)
      for (int p = 0; p <= k; p++)
        for (int S = 0; S <= 15; S++)
          f[id][p][S ^ ef] = nf[p][S ^ ef], nf[p][S ^ ef] = 0;
  }
}
int F[17][maxn], nF[17][maxn];
void Merge(int id) {
  if (tp[id] == 0) return;
  for (int i = 0; i <= k; i++) fwt(f[id][i], 1 << c, 1), fwt(F[i], 1 << c, 1);
  for (int p = 0; p <= k; p++)
    for (int q = 0; q <= k - p; q++)
      for (int j = 0; j < (1 << c); j++) {
        nF[p + q][j] = (nF[p + q][j] + (long long)F[p][j] * f[id][q][j]) % mod;
      }
  for (int i = 0; i <= k; i++) fwt(nF[i], 1 << c, qpow(2, mod - 2));
  memcpy(F, nF, sizeof nF), memset(nF, 0, sizeof nF);
}
int ans[maxn];
signed main() {
  scanf("%d%d%d", &n, &k, &c);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  for (int i = 1; i <= k; i++)
    fs[i] = (long long)fs[i - 1] * qpow(i, mod - 2) % mod;
  for (int i = 1, x; i <= n; i++) {
    x = _builtin_ctz((a[i] ^ (a[i] - k))), b[x][++tp[x]] = a[i];
  }
  F[0][0] = 1;
  for (int i = 0; i <= 17; i++) work(i);
  for (int i = 0; i <= 17; i++) Merge(i);
  int ttp = 0;
  for (int i = 1; i <= n; i++) ttp = ttp ^ a[i];
  int tmp = qpow(qpow(n, mod - 2), k);
  for (int i = 1; i <= k; i++) tmp = (long long)tmp * i % mod;
  for (int i = 0; i < (1 << c); i++)
    ans[i ^ ttp] = (long long)tmp * F[k][i] % mod;
  for (int i = 0; i < (1 << c); i++) printf("%d ", (ans[i] + mod) % mod);
  return 0;
}

```