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>
using namespace std;
const int mod = 998244353, N = 1e5;
int cnt[200], seq[200][20], fac[20], inv[20], ifac[20], popcnt[N], ln[N][20],
    tmp[N][20], ans[N], finalans[N], w[N], n, K, c;
int qmod1(const int &x) { return x >= mod ? x - mod : x; }
int qmod2(const int &x) { return x + (x >> 31 & mod); }
int qpower(int a, int b) {
  int ans = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod)
    if (b & 1) ans = 1ll * ans * a % mod;
  return ans;
}
void prework(int n) {
  fac[0] = ifac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = 1ll * fac[i - 1] * i % mod;
  inv[1] = 1;
  for (int i = 2; i <= n; i++)
    inv[i] = 1ll * (mod - mod / i) * inv[mod % i] % mod;
  for (int i = 1; i <= n; i++) ifac[i] = 1ll * ifac[i - 1] * inv[i] % mod;
  for (int i = 1; i < (1 << 16); i++) popcnt[i] = popcnt[i >> 1] + (i & 1);
}
struct Basis {
  int size, a[20], id[20];
  void clear() {
    for (int i = 0; i < c; i++) a[i] = 0, id[i] = -1;
    size = 0;
  }
  void ins(int x) {
    for (int i = c - 1; i >= 0; i--)
      if (x >> i & 1) {
        if (!a[i]) {
          a[i] = x, id[i] = size++;
          return;
        }
        x ^= a[i];
      }
  }
  int get(int x) {
    int ans = 0;
    for (int i = c - 1; i >= 0; i--)
      if (a[i] && (x >> i & 1)) ans ^= 1 << id[i], x ^= a[i];
    return ans;
  }
  int iget(int x) {
    int ans = 0;
    for (int i = c - 1; i >= 0; i--)
      if (a[i] && (x >> id[i] & 1)) ans ^= a[i];
    return ans;
  }
} xxj;
int main() {
  scanf("%d%d%d", &n, &K, &c);
  prework(K);
  int wsum = 0;
  int seqn = 0;
  map<unsigned long long, int> mp;
  for (int i = 1; i <= n; i++) {
    scanf("%d", w + i);
    wsum ^= w[i];
    int tmpseq[20];
    for (int j = 1; j <= K; j++) tmpseq[j] = w[i] ^ (w[i] - j);
    unsigned long long hsh = 0;
    for (int j = 1; j <= K; j++) hsh = hsh * 19260817 + tmpseq[j] + 233;
    if (!mp[hsh]) {
      ++seqn;
      copy(tmpseq + 1, tmpseq + K + 1, seq[seqn] + 1);
      mp[hsh] = seqn;
      cnt[seqn] = 1;
    } else
      cnt[mp[hsh]]++;
  }
  for (int T = 1, tS[20]; T <= seqn; T++) {
    xxj.clear();
    for (int i = 1; i <= K; i++) xxj.ins(seq[T][i]);
    int B = xxj.size;
    for (int i = 1; i <= K; i++) tS[i] = xxj.get(seq[T][i]);
    for (int S = 0; S < (1 << B); S++) fill(tmp[S], tmp[S] + K + 1, 0);
    for (int i = 1; i <= K; i++) {
      for (int S = 0; S < (1 << B); S++) {
        unsigned long long t = 0;
        for (int j = 1; j <= i; j++)
          t += 1ull * tmp[S ^ tS[j]][i - j] * ifac[j];
        tmp[S][i] = qmod2(-(int)(t % mod));
      }
      tmp[tS[i]][i] = qmod1(tmp[tS[i]][i] + ifac[i - 1]);
    }
    for (int S = 0, rS; S < (1 << B); S++) {
      rS = xxj.iget(S);
      for (int i = 1; i <= K; i++)
        ln[rS][i] =
            (ln[rS][i] + 1ull * cnt[T] * inv[i] % mod * tmp[S][i]) % mod;
    }
  }
  for (int i = 1, tmp[20]; i < (1 << c); i <<= 1)
    for (int j = 0; j < (1 << c); j += i << 1)
      for (int k = 0; k < i; k++) {
        int *a = ln[j + k], *b = ln[i + j + k];
        copy(b, b + K + 1, tmp);
        for (int t = 0; t <= K; t++)
          b[t] = qmod2(a[t] - b[t]), a[t] = qmod1(a[t] + tmp[t]);
      }
  for (int S = 0, f[20], g[20]; S < (1 << c); S++) {
    copy(ln[S], ln[S] + K + 1, f);
    for (int i = 1; i <= K; i++) f[i] = 1ll * i * f[i] % mod;
    g[0] = 1;
    for (int i = 1; i <= K; i++) {
      unsigned long long t = 0;
      for (int j = 1; j <= i; j++) t += 1ull * f[j] * g[i - j];
      g[i] = t % mod * inv[i] % mod;
    }
    ans[S] = 1ll * g[K] * fac[K] % mod;
  }
  for (int i = 1; i < (1 << c); i <<= 1)
    for (int j = 0; j < (1 << c); j += i << 1)
      for (int k = 0; k < i; k++) {
        int t = ans[i + j + k];
        ans[i + j + k] = qmod2(ans[j + k] - t),
                    ans[j + k] = qmod1(ans[j + k] + t);
      }
  int iv = mod - ((mod - 1) >> c);
  iv = 1ll * iv * qpower(n, mod - 1 - K) % mod;
  for (int i = 0; i < (1 << c); i++) ans[i] = 1ll * ans[i] * iv % mod;
  for (int i = 0; i < (1 << c); i++) finalans[i ^ wsum] = ans[i];
  for (int i = 0; i < (1 << c); i++) printf("%d ", finalans[i]);
  puts("");
}