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;
inline int add(int x, int y) {
  x += y;
  return x >= mod ? x - mod : x;
}
inline int sub(int x, int y) {
  x -= y;
  return x < 0 ? x + mod : x;
}
inline int mul(int x, int y) { return 1ll * x * y % mod; }
int quick_pow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = mul(res, x);
    x = mul(x, x), y >>= 1;
  }
  return res;
}
inline int getinv(int x) { return quick_pow(x, mod - 2); }
const int maxk = 17;
const int maxn = 1 << 16 | 5;
int fac[maxk], ifac[maxk], inv[maxk];
void init(int N) {
  fac[0] = 1;
  for (int i = 1; i <= N; i++) fac[i] = mul(fac[i - 1], i);
  ifac[N] = getinv(fac[N]);
  for (int i = N; i >= 1; i--) ifac[i - 1] = mul(ifac[i], i);
  inv[0] = inv[1] = 1;
  for (int i = 2; i <= N; i++) inv[i] = mul(inv[mod % i], mod - mod / i);
}
int n, K, c;
map<vector<int>, int> Map;
void getln(int *A) {
  static int B[maxk];
  B[0] = 0;
  for (int i = 1; i <= K; i++) {
    int tmp = 0;
    for (int j = 1; j < i; j++) tmp = add(tmp, mul(j, mul(B[j], A[i - j])));
    B[i] = sub(A[i], mul(tmp, inv[i]));
  }
  for (int i = 0; i <= K; i++) A[i] = B[i];
}
void getexp(int *A) {
  static int B[maxk];
  B[0] = 1;
  for (int i = 1; i <= K; i++) {
    int tmp = 0;
    for (int j = 0; j < i; j++) tmp = add(tmp, mul(mul(A[i - j], i - j), B[j]));
    B[i] = mul(tmp, inv[i]);
  }
  for (int i = 0; i <= K; i++) A[i] = B[i];
}
int popcnt[maxn], A[maxn];
vector<int> num[205];
int cnt[205], sum[maxn << 1], tot;
int st[205], top;
int Ln[maxn][maxk];
int main() {
  scanf("%d%d%d", &n, &K, &c), init(K);
  int all = 0;
  for (int i = 1, x; i <= n; i++) {
    scanf("%d", &x), all ^= x;
    vector<int> A;
    for (int j = 1; j <= K; j++) A.push_back(x ^ (x - j));
    Map[A]++;
  }
  for (auto u : Map) num[++tot] = u.first, cnt[tot] = u.second;
  int S = (1 << K) - 1;
  for (int i = 0; i <= S; i++) {
    static int f[maxk];
    f[0] = 1;
    for (int j = 0; j < K; j++)
      f[j + 1] = ((i >> j) & 1) ? mod - ifac[j + 1] : ifac[j + 1];
    getln(f);
    for (int j = 0; j <= K; j++) Ln[i][j] = f[j];
  }
  S = (1 << c) - 1;
  for (int i = 1; i <= S; i++) popcnt[i] = popcnt[i >> 1] + (i & 1);
  for (int i = 0; i <= S; i++) {
    for (int j = 1; j <= tot; j++) {
      int sta = 0;
      for (int k = 0; k < K; k++)
        if (popcnt[i & num[j][k]] & 1) sta |= (1 << k);
      if (!sum[sta]) st[++top] = sta;
      sum[sta] += cnt[j];
    }
    static int f[maxk], g[maxk], h[maxk];
    for (int j = 0; j <= K; j++) f[j] = h[j] = 0;
    f[0] = 1;
    for (int j = 1; j <= top; j++) {
      int sta = st[j];
      for (int k = 0; k <= K; k++) g[k] = mul(Ln[sta][k], sum[sta]);
      getexp(g);
      for (int k = 0; k <= K; k++)
        for (int l = 0; k + l <= K; l++)
          h[k + l] = add(h[k + l], mul(f[k], g[l]));
      for (int k = 0; k <= K; k++) f[k] = h[k], h[k] = 0;
      sum[sta] = 0;
    }
    top = 0;
    A[i] = mul(f[K], fac[K]);
  }
  int N = 1 << c;
  for (int l = 2; l <= N; l <<= 1) {
    int m = (l >> 1);
    for (int j = 0; j < N; j += l)
      for (int i = j; i < j + m; i++) {
        int u = A[i], v = A[i + m];
        A[i] = add(u, v);
        A[i + m] = sub(u, v);
      }
  }
  int tmp = getinv(mul(N, quick_pow(n, K)));
  for (int i = 0; i < N; i++) printf("%d ", mul(A[i ^ all], tmp));
  return 0;
}