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 M = 18, N = (1 << (M - 1)), mod = 998244353;
int qpow(int x, int y = mod - 2) {
  int res = 1;
  for (; y; x = (long long)x * x % mod, y >>= 1)
    if (y & 1) res = (long long)res * x % mod;
  return res;
}
int n, k, c, fac[N], ifac[N], inv[N], all;
void init(int x) {
  fac[0] = ifac[0] = inv[1] = 1;
  for (int i = (2); i <= (x); i++)
    inv[i] = (long long)inv[mod % i] * (mod - mod / i) % mod;
  for (int i = (1); i <= (x); i++)
    fac[i] = (long long)fac[i - 1] * i % mod,
    ifac[i] = (long long)ifac[i - 1] * inv[i] % mod;
}
struct node {
  int f[M];
} s[N];
int cnt[N], tot, fs = 1;
bool operator<(node a, node b) {
  for (int i = (0); i <= (k); i++)
    if (a.f[i] ^ b.f[i]) return a.f[i] < b.f[i];
  return false;
}
map<node, int> mp;
int a[N], ns[N], ln[N][M], v[N], g[N];
void Exp(int *f, int len) {
  g[0] = 1;
  for (int i = (1); i <= (len - 1); i++)
    for (int j = (1); j <= (i); j++)
      (g[i] += (long long)g[i - j] * f[j] % mod * j % mod * inv[i] % mod) %=
          mod;
  for (int i = (0); i <= (len - 1); i++) f[i] = g[i], g[i] = 0;
}
void Ln(int *f, int len) {
  g[0] = 0;
  for (int i = (1); i <= (len - 1); i++) {
    g[i] = f[i];
    for (int j = (1); j <= (i - 1); j++)
      (g[i] +=
       mod - (long long)g[j] * f[i - j] % mod * j % mod * inv[i] % mod) %= mod;
  }
  for (int i = (0); i <= (len - 1); i++) f[i] = g[i], g[i] = 0;
}
void IFWT(int *f, int len) {
  for (int i = 2; i <= len; i <<= 1)
    for (int j = 0, l = (i >> 1); j < len; j += i)
      for (int k = j; k < j + l; k++) {
        int pa = f[k], pb = f[k + l];
        f[k] = (pa + pb) % mod, f[k + l] = (pa + mod - pb) % mod;
      }
  for (int i = (0); i <= (len - 1); i++)
    f[i] = (long long)f[i] * inv[len] % mod;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k >> c, init(max(max(n, k), 1 << c) + 5);
  for (int i = (1); i <= (n); i++) {
    cin >> a[i], all ^= a[i];
    node w;
    for (int j = (0); j <= (k); j++) w.f[j] = (a[i] ^ (a[i] - j));
    mp[w]++;
  }
  for (auto w : mp) ++tot, s[tot] = w.first, cnt[tot] = w.second;
  for (int i = (0); i <= ((1 << (k + 1)) - 1); i++) {
    for (int j = (0); j <= (k); j++)
      ln[i][j] = ((i >> j & 1) ? mod - ifac[j] : ifac[j]);
    Ln(ln[i], k + 1);
  }
  for (int i = (0); i <= ((1 << c) - 1); i++) {
    for (int j = (0); j <= (k); j++) v[j] = 0;
    for (int j = (1); j <= (tot); j++) {
      int msk = 0;
      for (int t = (0); t <= (k); t++)
        if (__builtin_parity(i & s[j].f[t])) msk |= (1 << t);
      for (int t = (0); t <= (k); t++)
        (v[t] += (long long)ln[msk][t] * cnt[j] % mod) %= mod;
    }
    Exp(v, k + 1), ns[i] = v[k];
  }
  IFWT(ns, 1 << c);
  for (int i = (1); i <= (k); i++) fs = (long long)fs * inv[n] % mod;
  for (int i = (0); i <= ((1 << c) - 1); i++)
    cout << (long long)ns[all ^ i] * fs % mod * fac[k] % mod << " ";
  cout << "\n";
  return 0;
}