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;
int gi() {
  char ch = '!';
  int res = 0, f = 0;
  while (ch < '0' || ch > '9') {
    ch = getchar();
    if (ch == '-') f = 1;
  }
  while (ch >= '0' && ch <= '9') res = res * 10 + ch - '0', ch = getchar();
  return res;
}
const int N = 20, mod = 998244353;
void inc(int &x, int y) { x += y, x = x >= mod ? x - mod : x; }
int qpow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = 1ll * res * x % mod;
    x = 1ll * x * x % mod, y >>= 1;
  }
  return res;
}
int n, K, C, fac[N], inv[N], ans[1 << 16];
int f[N][N][N][2], g[N][N];
vector<int> pot[N];
void solve(int id) {
  static int dp[N][N][2], tmp[N][N][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0] = 1;
  for (auto A : pot[id]) {
    memset(tmp, 0, sizeof(tmp));
    for (int p = 0; p <= K; ++p)
      for (int r = 0; r < 16; ++r)
        for (int o = 0; o < 2; ++o)
          if (dp[p][r][o])
            for (int q = 0; p + q <= K; ++q)
              inc(tmp[p + q][r ^ ((A - q) & 15)][o ^ ((A & 15) < q)],
                  1ll * dp[p][r][o] * inv[q] % mod);
    memcpy(dp, tmp, sizeof(tmp));
  }
  memcpy(f[id], dp, sizeof(dp));
}
void dfs(int x, int val) {
  if (x < 4) {
    for (int p = 0; p < 16; ++p) ans[val ^ p] = g[K][p];
    return;
  }
  int tmp[N][N];
  memset(tmp, 0, sizeof(tmp));
  for (int i = 0; i <= K; ++i)
    for (int j = 0; j < 16; ++j)
      if (g[i][j])
        for (int k = 0; i + k <= K; ++k)
          for (int p = 0; p < 16; ++p)
            inc(tmp[i + k][j ^ p], 1ll * g[i][j] * f[x][k][p][0] % mod);
  swap(g, tmp);
  dfs(x - 1, val);
  memcpy(g, tmp, sizeof(tmp));
  memset(tmp, 0, sizeof(tmp));
  for (int i = 0; i <= K; ++i)
    for (int j = 0; j < 16; ++j)
      if (g[i][j])
        for (int k = 0; i + k <= K; ++k)
          for (int p = 0; p < 16; ++p)
            inc(tmp[i + k][j ^ p], 1ll * g[i][j] * f[x][k][p][1] % mod);
  swap(g, tmp);
  dfs(x - 1, val ^ ((1 << (x + 1)) - 16));
  memcpy(g, tmp, sizeof(tmp));
}
int main() {
  n = gi(), K = gi(), C = gi();
  fac[0] = 1;
  for (int i = 1; i <= K; ++i) fac[i] = 1ll * fac[i - 1] * i % mod;
  inv[K] = qpow(fac[K], mod - 2);
  for (int i = K - 1; ~i; --i) inv[i] = 1ll * inv[i + 1] * (i + 1) % mod;
  int s = 0;
  g[0][0] = 1;
  for (int i = 1; i <= n; ++i) {
    int A = gi();
    s ^= A;
    if ((A & 15) < K)
      pot[__builtin_ctz(A - (A & 15))].push_back(A);
    else {
      static int dp[N][N];
      memset(dp, 0, sizeof(dp));
      for (int p = 0; p <= K; ++p)
        for (int r = 0; r < 16; ++r)
          if (g[p][r])
            for (int q = 0; p + q <= K; ++q)
              inc(dp[p + q][r ^ ((A - q) & 15)], 1ll * g[p][r] * inv[q] % mod);
      memcpy(g, dp, sizeof(dp));
    }
  }
  for (int i = 4; i < C; ++i) solve(i);
  dfs(C - 1, s - (s & 15));
  int iv = 1ll * fac[K] * qpow(n, mod - 1 - K) % mod;
  for (int i = 0; i < 1 << C; ++i) printf("%lld ", 1ll * ans[i] * iv % mod);
  puts("");
  return 0;
}