#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 16) + 5, mod = 998244353;
void qmo(int &x) { x += x >> 31 & mod; }
template <typename T>
void read(T &x) {
  int ch = getchar();
  x = 0;
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
}
int ksm(int a, int b) {
  int res = 1;
  for (; b; b >>= 1, a = (long long)a * a % mod)
    if (b & 1) res = (long long)res * a % mod;
  return res;
}
int n, k, c, lim, vcnt, a[N], fac[N], inv[N], iv[N], xsum, sum[192],
    cnt[N << 1], f[N];
vector<int> vc[192];
map<vector<int>, int> mp;
int res[20], tmp1[20], tmp2[20];
void init(int m) {
  fac[0] = 1;
  for (int i = 1; i <= m; ++i) fac[i] = (long long)fac[i - 1] * i % mod;
  inv[m] = ksm(fac[m], mod - 2);
  for (int i = m; i; --i) {
    inv[i - 1] = (long long)inv[i] * i % mod;
    iv[i] = (long long)inv[i] * fac[i - 1] % mod;
  }
}
void polyLn(int *f, int *g, int n) {
  g[0] = 0;
  for (int i = 1; i <= n; ++i) {
    g[i] = 0;
    for (int j = 1; j < i; ++j)
      g[i] = (g[i] + (long long)f[j] * g[i - j]) % mod;
    g[i] = ((long long)i * f[i] + mod - g[i]) % mod;
  }
  for (int i = 1; i <= n; ++i) g[i] = (long long)g[i] * iv[i] % mod;
}
void polyExp(int *f, int *g, int n) {
  g[0] = 1;
  for (int i = 1; i <= n; ++i) {
    g[i] = 0;
    f[i] = (long long)f[i] * i % mod;
    for (int j = 1; j <= i; ++j)
      g[i] = (g[i] + (long long)f[j] * g[i - j]) % mod;
    g[i] = (long long)g[i] * iv[i] % mod;
  }
}
int main() {
  read(n);
  read(k);
  read(c);
  init(N - 1);
  lim = 1 << c;
  for (int i = 1; i <= n; ++i) {
    vector<int> tmp(k + 1);
    read(a[i]);
    xsum ^= a[i];
    for (int j = 0; j <= k; ++j) tmp[j] = a[i] ^ (a[i] - j);
    ++mp[tmp];
  }
  for (auto _ : mp) {
    vc[vcnt] = _.first;
    sum[vcnt] = _.second;
    ++vcnt;
  }
  for (int S = 0; S < lim; ++S) {
    vector<int> val;
    for (int i = 0; i < vcnt; ++i) {
      int mask = 0;
      for (int j = 0; j <= k; ++j)
        mask |= (__builtin_popcount(S & vc[i][j]) & 1) << j;
      if (!cnt[mask]) val.emplace_back(mask);
      cnt[mask] += sum[i];
    }
    memset(res, 0, sizeof res);
    res[0] = 1;
    for (int T : val) {
      for (int i = 0; i <= k; ++i)
        tmp1[i] = (T >> i & 1) ? mod - inv[i] : inv[i];
      polyLn(tmp1, tmp2, k);
      for (int i = 1; i <= k; ++i) tmp2[i] = (long long)tmp2[i] * cnt[T] % mod;
      polyExp(tmp2, tmp1, k);
      memset(tmp2, 0, sizeof tmp2);
      for (int i = 0; i <= k; ++i)
        for (int j = 0; j <= i; ++j)
          tmp2[i] = (tmp2[i] + (long long)res[j] * tmp1[i - j]) % mod;
      memcpy(res, tmp2, sizeof res);
      cnt[T] = 0;
    }
    f[S] = res[k];
  }
  for (int mid = 1; mid < lim; mid <<= 1)
    for (int i = 0; i < lim; i += mid << 1)
      for (int j = 0; j < mid; ++j) {
        int y = f[i + j + mid];
        qmo(f[i + j + mid] = f[i + j] - y);
        qmo(f[i + j] += y - mod);
      }
  int coe =
      (long long)fac[k] * ksm(lim, mod - 2) % mod * ksm(n, mod - 1 - k) % mod;
  for (int i = 0; i < lim; ++i)
    printf("%lld%c", (long long)coe * f[i ^ xsum] % mod, " \n"[i == lim - 1]);
}

### Prompt

Develop a solution in cpp to the problem described below:

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>
using namespace std;
const int N = (1 << 16) + 5, mod = 998244353;
void qmo(int &x) { x += x >> 31 & mod; }
template <typename T>
void read(T &x) {
  int ch = getchar();
  x = 0;
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
}
int ksm(int a, int b) {
  int res = 1;
  for (; b; b >>= 1, a = (long long)a * a % mod)
    if (b & 1) res = (long long)res * a % mod;
  return res;
}
int n, k, c, lim, vcnt, a[N], fac[N], inv[N], iv[N], xsum, sum[192],
    cnt[N << 1], f[N];
vector<int> vc[192];
map<vector<int>, int> mp;
int res[20], tmp1[20], tmp2[20];
void init(int m) {
  fac[0] = 1;
  for (int i = 1; i <= m; ++i) fac[i] = (long long)fac[i - 1] * i % mod;
  inv[m] = ksm(fac[m], mod - 2);
  for (int i = m; i; --i) {
    inv[i - 1] = (long long)inv[i] * i % mod;
    iv[i] = (long long)inv[i] * fac[i - 1] % mod;
  }
}
void polyLn(int *f, int *g, int n) {
  g[0] = 0;
  for (int i = 1; i <= n; ++i) {
    g[i] = 0;
    for (int j = 1; j < i; ++j)
      g[i] = (g[i] + (long long)f[j] * g[i - j]) % mod;
    g[i] = ((long long)i * f[i] + mod - g[i]) % mod;
  }
  for (int i = 1; i <= n; ++i) g[i] = (long long)g[i] * iv[i] % mod;
}
void polyExp(int *f, int *g, int n) {
  g[0] = 1;
  for (int i = 1; i <= n; ++i) {
    g[i] = 0;
    f[i] = (long long)f[i] * i % mod;
    for (int j = 1; j <= i; ++j)
      g[i] = (g[i] + (long long)f[j] * g[i - j]) % mod;
    g[i] = (long long)g[i] * iv[i] % mod;
  }
}
int main() {
  read(n);
  read(k);
  read(c);
  init(N - 1);
  lim = 1 << c;
  for (int i = 1; i <= n; ++i) {
    vector<int> tmp(k + 1);
    read(a[i]);
    xsum ^= a[i];
    for (int j = 0; j <= k; ++j) tmp[j] = a[i] ^ (a[i] - j);
    ++mp[tmp];
  }
  for (auto _ : mp) {
    vc[vcnt] = _.first;
    sum[vcnt] = _.second;
    ++vcnt;
  }
  for (int S = 0; S < lim; ++S) {
    vector<int> val;
    for (int i = 0; i < vcnt; ++i) {
      int mask = 0;
      for (int j = 0; j <= k; ++j)
        mask |= (__builtin_popcount(S & vc[i][j]) & 1) << j;
      if (!cnt[mask]) val.emplace_back(mask);
      cnt[mask] += sum[i];
    }
    memset(res, 0, sizeof res);
    res[0] = 1;
    for (int T : val) {
      for (int i = 0; i <= k; ++i)
        tmp1[i] = (T >> i & 1) ? mod - inv[i] : inv[i];
      polyLn(tmp1, tmp2, k);
      for (int i = 1; i <= k; ++i) tmp2[i] = (long long)tmp2[i] * cnt[T] % mod;
      polyExp(tmp2, tmp1, k);
      memset(tmp2, 0, sizeof tmp2);
      for (int i = 0; i <= k; ++i)
        for (int j = 0; j <= i; ++j)
          tmp2[i] = (tmp2[i] + (long long)res[j] * tmp1[i - j]) % mod;
      memcpy(res, tmp2, sizeof res);
      cnt[T] = 0;
    }
    f[S] = res[k];
  }
  for (int mid = 1; mid < lim; mid <<= 1)
    for (int i = 0; i < lim; i += mid << 1)
      for (int j = 0; j < mid; ++j) {
        int y = f[i + j + mid];
        qmo(f[i + j + mid] = f[i + j] - y);
        qmo(f[i + j] += y - mod);
      }
  int coe =
      (long long)fac[k] * ksm(lim, mod - 2) % mod * ksm(n, mod - 1 - k) % mod;
  for (int i = 0; i < lim; ++i)
    printf("%lld%c", (long long)coe * f[i ^ xsum] % mod, " \n"[i == lim - 1]);
}

```