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 N = 65537;
const int mod = 998244353;
int n, k, c, sum;
int y[N], s[17], fac[17], finv[17], num[N], Ans[N];
map<vector<int>, int> mp;
vector<int> h[N], Ln[N], g[N];
inline int qpow(int x, int k, int r = 1) {
  for (; k; k >>= 1, x = 1ll * x * x % mod)
    if (k & 1) r = 1ll * r * x % mod;
  return r;
}
inline vector<int> operator*(vector<int> a, vector<int> b) {
  vector<int> c(a.size());
  for (int i = 0; i < c.size(); ++i)
    for (int j = 0; i + j < c.size(); ++j)
      (c[i + j] += 1ll * a[i] * b[j] % mod) %= mod;
  return c;
}
inline vector<int> getinv(vector<int> a, int n) {
  vector<int> b(n);
  const int inv = qpow(a[0], mod - 2);
  b[0] = inv;
  for (int i = 1; i < n; ++i) {
    int v = 0;
    for (int j = 0; j < i; ++j) (v += mod - 1ll * b[j] * a[i - j] % mod) %= mod;
    b[i] = 1ll * v * inv % mod;
  }
  return b;
}
inline vector<int> getdao(vector<int> a, int n) {
  vector<int> b(n);
  for (int i = 0; i < n - 1; ++i) b[i] = a[i + 1] * (i + 1ll) % mod;
  return b;
}
inline vector<int> getji(vector<int> a, int n) {
  vector<int> b(n);
  for (int i = 1; i < n; ++i) b[i] = 1ll * a[i - 1] * qpow(i, mod - 2) % mod;
  return b;
}
inline vector<int> getln(vector<int> a, int n) {
  return getji(getdao(a, n) * getinv(a, n), n);
}
inline vector<int> getexp(vector<int> a, int n) {
  a = getdao(a, n);
  vector<int> b(n);
  b[0] = 1;
  for (int i = 0; i < n - 1; ++i) {
    int v = 0;
    for (int j = 0; j <= i; ++j) (v += 1ll * b[j] * a[i - j] % mod) %= mod;
    b[i + 1] = 1ll * v * qpow(i + 1, mod - 2) % mod;
  }
  return b;
}
int main() {
  scanf("%d%d%d", &n, &k, &c);
  for (int i = fac[0] = 1; i <= k; ++i) fac[i] = 1ll * fac[i - 1] * i % mod;
  finv[k] = qpow(fac[k], mod - 2);
  for (int i = k; i; --i) finv[i - 1] = 1ll * finv[i] * i % mod;
  for (int i = 0; i <= k; ++i)
    s[i] = 1ll * qpow(qpow(n, i), mod - 2) * finv[i] % mod;
  for (int i = 1; i <= n; ++i) scanf("%d", &y[i]), sum ^= y[i];
  for (int i = 1; i <= n; ++i) {
    vector<int> ve;
    for (int j = 0; j <= k; ++j) ve.push_back(y[i] ^ y[i] - j);
    ++mp[ve];
  }
  for (int i = 0; i < 1 << c; ++i) h[i].resize(k + 1);
  for (int i = 1; i < 1 << c; ++i) num[i] = num[i >> 1] + (i & 1);
  for (int i = 0; i < 1 << k; ++i) {
    vector<int> f(k + 1);
    f[0] = 1;
    for (int j = 1; j <= k; ++j) f[j] = i >> j - 1 & 1 ? mod - s[j] : s[j];
    Ln[i] = getln(f, k + 1);
  }
  for (auto p : mp) {
    vector<int> f = p.first;
    for (int i = 0; i < 1 << c; ++i) {
      int s = 0;
      for (int j = 1; j <= k; ++j) s |= (num[i & f[j]] & 1) << j - 1;
      for (int j = 0; j <= k; ++j)
        (h[i][j] += 1ll * Ln[s][j] * p.second % mod) %= mod;
    }
  }
  for (int i = 0; i < 1 << c; ++i) {
    h[i] = getexp(h[i], k + 1);
    Ans[i] = 1ll * h[i][k] * fac[k] % mod;
  }
  for (int i = 1; i < 1 << c; i <<= 1)
    for (int j = 0; j < 1 << c; j += i << 1)
      for (int k = 0; k < i; ++k) {
        int x = Ans[j + k], y = Ans[j + k + i];
        Ans[j + k] = (x + y) % mod;
        Ans[j + k + i] = (x - y + mod) % mod;
      }
  const int inv = qpow(1 << c, mod - 2);
  for (int i = 0; i < 1 << c; ++i) Ans[i] = 1ll * Ans[i] * inv % mod;
  for (int i = 0; i < 1 << c; ++i) printf("%d ", Ans[i ^ sum]);
  return puts(""), 0;
}