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 N = 66005, mod = 998244353, inv2 = 499122177;
int n, m, k, a, b[N], c, sum, pwn = 1, fac[20], ifac[20], siz[N], h[N];
int stats[220], maxn[220], to[N], bel[N << 1], val[220][N], pw[220][N];
bool ck[N << 1];
inline int add(int a, int b) {
  a += b;
  return a < mod ? a : a - mod;
}
inline int dec(int a, int b) {
  a -= b;
  return a < 0 ? a + mod : a;
}
inline int mul(int a, int b) { return 1LL * a * b % mod; }
inline int fastpow(int a, int x) {
  int res = 1;
  while (x) {
    if (x & 1) {
      res = mul(res, a);
    }
    x >>= 1;
    a = mul(a, a);
  }
  return res;
}
struct data {
  int a[20];
  bool operator<(const data &n) const {
    for (int i = 0; i <= k; i++) {
      if (a[i] != n.a[i]) {
        return a[i] < n.a[i];
      }
    }
    return false;
  }
  bool operator==(const data &n) const {
    for (int i = 0; i <= k; i++) {
      if (a[i] != n.a[i]) {
        return false;
      }
    }
    return true;
  }
  void setone() {
    a[0] = 1;
    for (int i = 1; i <= k; i++) {
      a[i] = 0;
    }
  }
} tmp, base, d[N], p[N], prod[N];
void mul(data &a, data &b, data &c) {
  for (int i = 0; i <= k; i++) {
    for (int j = 0; i + j <= k; j++) {
      tmp.a[i + j] = add(tmp.a[i + j], mul(a.a[i], b.a[j]));
    }
  }
  for (int i = 0; i <= k; i++) {
    c.a[i] = tmp.a[i];
    tmp.a[i] = 0;
  }
}
void fwt(int a[], int pos, int len) {
  if (len == 1) {
    a[pos] = 1;
    return;
  }
  if (pos < (len >> 1)) {
    fwt(a, pos, len >> 1);
    for (int i = len >> 1; i < len; i++) {
      a[i] = a[i - (len >> 1)];
    }
  } else {
    fwt(a, pos - (len >> 1), len >> 1);
    for (int i = len >> 1; i < len; i++) {
      a[i] = mod - a[i - (len >> 1)];
    }
  }
}
void ifwt(int a[]) {
  for (int i = 1; i < m; i <<= 1) {
    for (int j = 0; j < m; j += (i << 1)) {
      int x, y;
      for (int k = j; k < j + i; k++) {
        x = a[k];
        y = a[k + i];
        a[k] = mul(add(x, y), inv2);
        a[k + i] = mul(dec(x, y), inv2);
      }
    }
  }
}
void lagrange(int y[], int n) {
  static int z[20], tmp[20], res[20];
  for (int i = 0; i <= n; i++) {
    z[i] = tmp[i] = res[i] = 0;
  }
  z[0] = 1;
  for (int i = 0; i <= n; i++) {
    for (int j = i + 1; j >= 1; j--) {
      z[j] = add(z[j - 1], mul(z[j], mod - i));
    }
    z[0] = mul(z[0], mod - i);
  }
  for (int i = 0; i <= n; i++) {
    int prod = 1;
    for (int j = 0; j <= n; j++) {
      if (i != j) {
        prod = mul(prod, dec(i, j));
      }
    }
    prod = mul(y[i], fastpow(prod, mod - 2));
    for (int j = 0; j <= n + 1; j++) {
      tmp[j] = z[j];
    }
    for (int j = n + 1; j >= 1; j--) {
      res[j - 1] = add(res[j - 1], mul(tmp[j], prod));
      tmp[j - 1] = add(tmp[j - 1], mul(tmp[j], i));
    }
  }
  for (int i = 0; i <= n; i++) {
    y[i] = res[i];
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &c);
  m = 1 << c;
  fac[0] = 1;
  for (int i = 1; i <= k; i++) {
    fac[i] = mul(fac[i - 1], i);
    pwn = 1LL * pwn * n % mod;
  }
  pwn = fastpow(pwn, mod - 2);
  ifac[k] = fastpow(fac[k], mod - 2);
  for (int i = k; i >= 1; i--) {
    ifac[i - 1] = mul(ifac[i], i);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    sum ^= a;
    for (int j = 0; j <= k; j++) {
      d[i].a[j] = a ^ (a - j);
    }
  }
  sort(d, d + n);
  int tmp = n;
  n = 0;
  for (int i = 0, j; i < tmp; i = j + 1) {
    j = i;
    while (j + 1 < tmp && d[j] == d[j + 1]) {
      j++;
    }
    siz[n] = j - i + 1;
    d[n++] = d[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= k; j++) {
      h[++h[0]] = d[i].a[j];
    }
  }
  sort(h + 1, h + h[0] + 1);
  h[0] = unique(h + 1, h + h[0] + 1) - h - 1;
  for (int i = 1; i <= h[0]; i++) {
    to[h[i]] = i;
    fwt(val[i], h[i], m);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      int sta = 0;
      for (int l = 0; l <= k; l++) {
        sta += (val[to[d[i].a[l]]][j] == 1 ? 0 : 1) << l;
      }
      if (!ck[sta]) {
        ck[sta] = true;
        stats[++stats[0]] = sta;
        bel[sta] = stats[0];
      }
      pw[bel[sta]][j] += siz[i];
      maxn[bel[sta]] = max(maxn[bel[sta]], pw[bel[sta]][j]);
    }
  }
  for (int i = 0; i < m; i++) {
    prod[i].setone();
  }
  for (int i = 1; i <= stats[0]; i++) {
    for (int j = 0; j <= k; j++) {
      base.a[j] = mul(ifac[j], (stats[i] >> j) & 1 ? mod - 1 : 1);
    }
    p[0].setone();
    for (int j = 1; j <= maxn[i]; j++) {
      mul(p[j - 1], base, p[j]);
    }
    for (int j = 0; j < m; j++) {
      if (pw[i][j]) {
        mul(prod[j], p[pw[i][j]], prod[j]);
      }
    }
  }
  for (int i = 0; i < m; i++) {
    b[i] = prod[i].a[k];
  }
  ifwt(b);
  for (int i = 0; i < m; i++) {
    printf("%d ", mul(b[sum ^ i], mul(fac[k], pwn)));
  }
  puts("");
  return 0;
}