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;
long long h[17][17], ans[65536], N, jc[17], Jc[17];
int a[65536], p[17], n, K, L, c, i, j, k, l, Sum, x;
struct type {
  long long a[32];
  void clear() { memset(a, 0, sizeof(a)); }
};
struct Type {
  type a[17];
  void clear() {
    int i;
    for (i = 0; i <= 16; i++) a[i].clear();
  }
} g[17], f[4096], F[4096], s, I;
void turn(type &a, int tp) {
  int i, j, k, l, S = p[L + 1], s1 = 2, s2 = 1;
  long long u, v;
  for (i = 1; i <= L + 1; i++) {
    S >>= 1;
    for (j = 0; j <= S - 1; j++) {
      for (k = 0; k <= s2 - 1; k++) {
        u = a.a[j * s1 + k], v = a.a[j * s1 + k + s2];
        a.a[j * s1 + k] = (u + v) % 998244353;
        a.a[j * s1 + k + s2] = (u - v) % 998244353;
        if (tp == -1)
          a.a[j * s1 + k] = a.a[j * s1 + k] * 499122177 % 998244353,
                       a.a[j * s1 + k + s2] =
                           a.a[j * s1 + k + s2] * 499122177 % 998244353;
      }
    }
    s1 <<= 1, s2 <<= 1;
  }
}
type operator+(type a, type b) {
  static type c;
  int i;
  for (i = 0; i <= p[L + 1] - 1; i++) c.a[i] = (a.a[i] + b.a[i]) % 998244353;
  return c;
}
type operator*(type a, type b) {
  static type c;
  int i;
  for (i = 0; i <= p[L + 1] - 1; i++) c.a[i] = (a.a[i] * b.a[i]) % 998244353;
  return c;
}
Type operator*(Type a, Type b) {
  static Type c;
  int i, j, k, l;
  c.clear();
  for (i = 0; i <= K; i++) {
    for (j = 0; j <= i; j++) c.a[i] = c.a[i] + (a.a[j] * b.a[i - j]);
  }
  return c;
}
void Turn(Type &a, int tp) {
  int i;
  for (i = 0; i <= K; i++) turn(a.a[i], tp);
}
void TurnEGF(Type &a) {
  int i, j;
  for (i = 0; i <= K; i++) {
    for (j = 0; j <= p[L + 1] - 1; j++)
      a.a[i].a[j] = a.a[i].a[j] * Jc[i] % 998244353;
  }
}
long long qpower(long long a, int b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % 998244353;
    a = a * a % 998244353;
    b >>= 1;
  }
  return ans;
}
Type Qpower(Type a, int b) {
  static Type ans;
  ans = I;
  while (b) {
    if (b & 1) ans = ans * a;
    a = a * a;
    b >>= 1;
  }
  return ans;
}
void init() {
  int i;
  p[0] = jc[0] = 1;
  for (i = 1; i <= 16; i++)
    p[i] = p[i - 1] * 2, jc[i] = jc[i - 1] * i % 998244353;
  Jc[16] = qpower(jc[16], 998244351);
  for (i = 15; i >= 0; i--) Jc[i] = Jc[i + 1] * (i + 1) % 998244353;
}
void dp() {
  int I, i, j, k, k2, l, x, S = 1;
  f[0] = g[c];
  for (I = c - 1; I >= L; I--) {
    for (i = 0; i <= S - 1; i++) {
      s = f[i] * g[I], l = i & 1, Turn(s, -1);
      for (j = 0; j <= K; j++) {
        for (k = 0; k <= p[L] - 1; k++) {
          k2 = k ^ p[L];
          F[i * 2 + l].a[j].a[k] =
              ((F[i * 2 + l].a[j].a[k]) + (s.a[j].a[k])) % 998244353;
          F[i * 2 + (!l)].a[j].a[k] =
              ((F[i * 2 + (!l)].a[j].a[k]) + (s.a[j].a[k2])) % 998244353;
        }
      }
      Turn(F[i * 2], 1), Turn(F[i * 2 + 1], 1);
    }
    for (i = 0; i <= S * 2 - 1; i++) f[i] = F[i], F[i].clear();
    S <<= 1;
  }
  for (x = 0; x <= p[c - L] - 1; x++) {
    Turn(f[x], -1);
    for (k = 0; k <= p[L] - 1; k++)
      ans[k + x * p[L]] = ((ans[k + x * p[L]]) + (f[x].a[K].a[k])) % 998244353;
  }
}
int main() {
  init();
  scanf("%d%d%d", &n, &K, &c);
  L = ceil(log2(K));
  for (i = 1; i <= n; i++) {
    scanf("%d", &x), Sum ^= x;
    for (l = L; l <= c - 1; l++)
      if (x & p[l]) break;
    k = x & (p[L] - 1);
    ++h[l][k];
  }
  I.a[0].a[0] = 1, Turn(I, 1);
  for (i = L; i <= c; i++) g[i] = I;
  for (i = L; i <= c; i++) {
    for (j = 0; j <= p[L] - 1; j++)
      if (h[i][j]) {
        s.clear();
        for (k = 0; k <= (j < K ? j : K); k++) ++s.a[k].a[j ^ (j - k)];
        if (j < K) {
          for (k = j + 1; k <= K; k++) ++s.a[k].a[j ^ (p[L] + j - k) ^ p[L]];
        }
        TurnEGF(s);
        Turn(s, 1);
        g[i] = g[i] * Qpower(s, h[i][j]);
      }
  }
  dp();
  for (i = 0; i <= p[c] - 1; i++)
    ans[i] = (ans[i] + 998244353) % 998244353 * jc[K] % 998244353;
  N = qpower(qpower(n, K), 998244351);
  for (i = 0; i <= p[c] - 1; i++) printf("%lld ", ans[i ^ Sum] * N % 998244353);
  printf("\n");
  fclose(stdin);
  fclose(stdout);
  return 0;
}