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>
const int P = 998244353;
int norm(int x) {
  if (x >= P) x -= P;
  return x;
}
int reduce(int x) {
  if (x < 0) x += P;
  return x;
}
void add(int &x, int y) {
  if ((x += y) >= P) x -= P;
}
void sub(int &x, int y) {
  if ((x -= y) < 0) x += P;
}
int mpow(int b, int p) {
  int r = 1;
  for (; p; p >>= 1, b = (long long)b * b % P)
    if (p & 1) r = (long long)r * b % P;
  return r;
}
int k, s, c;
int iv[20];
void pexp(int *f) {
  assert(f[0] == 0);
  static int t[20];
  for (int i = 0; i <= k; i++) t[i] = f[i], f[i] = 0;
  f[0] = 1;
  for (int i = 1; i <= k; i++) {
    for (int j = 0; j < i; j++)
      add(f[i], (long long)f[j] * t[i - j] % P * (i - j) % P);
    f[i] = (long long)f[i] * iv[i] % P;
  }
}
void plog(int *f) {
  assert(f[0] == 1);
  static int t[20];
  for (int i = 0; i <= k; i++) t[i] = f[i], f[i] = 0;
  f[0] = 0;
  for (int i = 1; i <= k; i++) {
    f[i] = (long long)i * t[i] % P;
    for (int j = 1; j < i; j++)
      sub(f[i], (long long)t[j] * f[i - j] % P * (i - j) % P);
    f[i] = (long long)f[i] * iv[i] % P;
  }
}
void ifwt(int *a, int n) {
  for (int j = 1; j < n; j <<= 1)
    for (int i = 0, t; i < n; i++)
      if (i & j) t = a[i], a[i] = reduce(a[i ^ j] - t), add(a[i ^ j], t);
  int ivn = mpow(n, P - 2);
  for (int i = 0; i < n; i++) a[i] = (long long)a[i] * ivn % P;
}
int lg[1 << 16], fct[20], ifct[20], bt[1 << 16];
void init() {
  iv[1] = 1;
  for (int i = 2; i <= k; i++)
    iv[i] = reduce(0 - (long long)iv[P % i] * (P / i) % P);
  fct[0] = ifct[0] = 1;
  for (int i = 1; i <= k; i++)
    ifct[i] = mpow(fct[i] = (long long)fct[i - 1] * i % P, P - 2);
  for (int i = 0; i < c; i++) lg[1 << i] = i;
  for (int i = 1; i < s || i < 32; i++) bt[i] = bt[i >> 1] ^ (i & 1);
}
int f[1 << 16][20], sgn[1 << 16];
int a[16][16], b[16];
int g[32][20], h[20], sgn1[32];
void calc_b() {
  for (int p = 0; p < 16; p++) {
    for (int j = 0; j <= k; j++) g[p][j] = 0;
    sgn1[p] = 0;
  }
  for (int i = k; i < 16; i++) {
    for (int p = 0; p < 16; p++) {
      for (int j = 0; j <= k; j++)
        h[j] = bt[(i - j) & p] ? reduce(0 - ifct[j]) : ifct[j];
      if (h[0] == P - 1) {
        for (int j = 0; j <= k; j++) h[j] = reduce(0 - h[j]);
        sgn1[p] ^= (b[i] & 1);
      }
      plog(h);
      for (int j = 0; j <= k; j++) add(g[p][j], (long long)b[i] * h[j] % P);
    }
  }
  for (int i = 0; i < s; i++) {
    int p = i & 15;
    for (int j = 0; j <= k; j++) add(f[i][j], g[p][j]);
    sgn[i] ^= sgn1[p];
  }
}
void calc_a(int x) {
  for (int p = 0; p < 32; p++) {
    for (int j = 0; j <= k; j++) g[p][j] = 0;
    sgn1[p] = 0;
  }
  for (int i = 0; i < k; i++) {
    for (int p = 0; p < 32; p++) {
      for (int j = 0; j <= i; j++)
        h[j] = bt[(i - j) & p] ? reduce(0 - ifct[j]) : ifct[j];
      for (int j = i + 1; j <= k; j++)
        h[j] = bt[((j - i - 1) | 16) & p] ? reduce(0 - ifct[j]) : ifct[j];
      if (h[0] == P - 1) {
        for (int j = 0; j <= k; j++) h[j] = reduce(0 - h[j]);
        sgn1[p] ^= (a[x][i] & 1);
      }
      plog(h);
      for (int j = 0; j <= k; j++) add(g[p][j], (long long)a[x][i] * h[j] % P);
    }
  }
  int m = (1 << (x + 1)) - 1;
  for (int i = 0; i < s; i++) {
    int p = (i & 15) | (bt[i & m] << 4);
    for (int j = 0; j <= k; j++) add(f[i][j], g[p][j]);
    sgn[i] ^= sgn1[p];
  }
}
int ans[1 << 16], mask, n;
int main() {
  scanf("%d%d%d", &n, &k, &c), s = (1 << c), init();
  for (int i = 0, x, y; i < n; i++) {
    scanf("%d", &x), y = (x & 15), x ^= y;
    mask ^= x;
    if (y >= k)
      b[y]++;
    else
      a[lg[x & -x]][y]++;
  }
  calc_b();
  for (int i = 4; i < c; i++) calc_a(i);
  for (int i = 0; i < s; i++) {
    pexp(f[i]);
    if (sgn[i])
      ans[i] = reduce(0 - f[i][k]);
    else
      ans[i] = f[i][k];
  }
  ifwt(ans, s);
  int coef = (long long)fct[k] * mpow(n, (P - 1) - k) % P;
  for (int i = 0; i < s; i++)
    printf("%lld ", (long long)ans[i ^ mask] * coef % P);
  puts("");
}