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 maxb = 16;
const int mod = 998244353;
int n, k, c;
int ifac[maxb + 1], fac[maxb + 1];
int a[1 << maxb], x[1 << maxb], pc[1 << maxb], ans[1 << maxb];
vector<int> vec[maxb + 1];
class Poly {
 public:
  int p[maxb + 1];
  Poly() {
    p[0] = 1;
    for (int i = 1; i <= k; i++) p[i] = 0;
  }
  void add(int x, int y) {
    static int np[maxb + 1], tmp[maxb + 1];
    for (int i = 0; i <= k; i++) {
      np[i] = 0;
      tmp[i] = pc[x & (y - i)] & 1 ? mod - ifac[i] : ifac[i];
    }
    for (int i = 0; i <= k; i++) {
      unsigned long long sum = 0;
      for (int j = 0; j <= i; j++)
        if (p[j]) sum += 1LL * p[j] * tmp[i - j];
      np[i] = sum % mod;
    }
    for (int i = 0; i <= k; i++) p[i] = np[i];
  }
  void mult(Poly o) {
    static int np[maxb + 1];
    for (int i = 0; i <= k; i++) np[i] = 0;
    for (int i = 0; i <= k; i++)
      if (p[i])
        for (int j = 0; j <= k - i; j++)
          if (o.p[j]) np[i + j] = (np[i + j] + 1LL * p[i] * o.p[j]) % mod;
    for (int i = 0; i <= k; i++) p[i] = np[i];
  }
  void neg() {
    for (int i = 0; i <= k; i++)
      if (p[i]) p[i] = mod - p[i];
  }
} val[1 << maxb], tmp;
int power(int x, int pow) {
  int res = 1;
  for (; pow; pow >>= 1) {
    if (pow & 1) res = 1LL * res * x % mod;
    x = 1LL * x * x % mod;
  }
  return res;
}
void fwt(int *x, int sz) {
  for (int m = 2; m <= sz; m <<= 1) {
    int mm = m >> 1;
    for (int i = 0; i < sz; i += m) {
      for (int j = i; j < i + mm; j++) {
        int u = x[j], v = x[j + mm];
        x[j] = u + v;
        x[j + mm] = u - v;
      }
    }
  }
}
void ifwt(int *x, int sz) {
  for (int m = 2; m <= sz; m <<= 1) {
    int mm = m >> 1;
    for (int i = 0; i < sz; i += m) {
      for (int j = i; j < i + mm; j++) {
        int u = x[j], v = x[j + mm];
        x[j] = 1LL * (u + v) * (mod + 1) / 2 % mod;
        x[j + mm] = 1LL * (u - v + mod) * (mod + 1) / 2 % mod;
      }
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &c);
  fac[0] = ifac[0] = 1;
  for (int i = 1; i <= k; i++) {
    fac[i] = 1LL * fac[i - 1] * i % mod;
    ifac[i] = power(fac[i], mod - 2);
  }
  for (int mask = 0; mask < (1 << c); mask++)
    pc[mask] = pc[mask >> 1] + (mask & 1);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    int cur = 0;
    for (int j = 1; j <= k; j++) cur |= (x ^ (x - j));
    vec[__builtin_popcount(cur)].push_back(x);
  }
  for (int i = 1; i <= c; i++)
    if (!vec[i].empty()) {
      int sz = int(vec[i].size());
      for (int mask = 0; mask < (1 << (c - i)); mask++) x[mask] = 0;
      for (int j = 0; j < sz; j++) x[vec[i][j] >> i]++;
      fwt(x, 1 << (c - i));
      for (int mask = 0; mask < (1 << i); mask++) {
        tmp = Poly();
        for (int j = 0; j < sz; j++) tmp.add(mask, vec[i][j] & ((1 << i) - 1));
        for (int nmask = 0; nmask < (1 << (c - i)); nmask++) {
          val[(nmask << i) | mask].mult(tmp);
          if (((sz - x[nmask]) >> 1) & 1) val[(nmask << i) | mask].neg();
        }
      }
    }
  int acoef = 1LL * fac[k] * power(power(n, k), mod - 2) % mod;
  for (int mask = 0; mask < (1 << c); mask++) ans[mask] = val[mask].p[k];
  ifwt(ans, (1 << c));
  for (int mask = 0; mask < (1 << c); mask++)
    printf("%d%c", int(1LL * ans[mask] * acoef % mod),
           mask == (1 << c) - 1 ? '\n' : ' ');
  return 0;
}