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 = 1 << 16 | 5;
const int mo = 998244353;
int n, k, c;
int fac[20], inv[20];
int vis[N * 2], f[N];
map<vector<int>, int> mp;
int cnt[65536];
void init() {
  fac[0] = inv[0] = inv[1] = 1;
  for (int i = (int)(2); i <= (int)(18); i++)
    inv[i] = 1ll * inv[mo % i] * (mo - mo / i) % mo;
  for (int i = (int)(1); i <= (int)(18); i++)
    inv[i] = 1ll * inv[i - 1] * inv[i] % mo;
  for (int i = (int)(1); i <= (int)(18); i++)
    fac[i] = 1ll * fac[i - 1] * i % mo;
}
int power(int x, int y) {
  int s = 1;
  for (; y; y /= 2, x = 1ll * x * x % mo)
    if (y & 1) s = 1ll * s * x % mo;
  return s;
}
void work(int *res, int st, int T) {
  int a[20], b[20], c[20], d[20];
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  memset(c, 0, sizeof(c));
  memset(d, 0, sizeof(d));
  for (int i = (int)(0); i <= (int)(k); i++)
    a[i] = (st & (1 << i) ? mo - 1 : 1);
  for (int i = (int)(0); i <= (int)(k); i++) a[i] = 1ll * a[i] * inv[i] % mo;
  for (int i = (int)(1); i <= (int)(k); i++) b[i - 1] = 1ll * a[i] * i * T % mo;
  c[0] = d[0] = 1;
  for (int i = (int)(1); i <= (int)(k); i++) {
    int sum = 0;
    for (int j = (int)(0); j <= (int)(i - 1); j++)
      sum = (sum + 1ll * b[j] * d[i - 1 - j]) % mo;
    c[i] = 1ll * sum * inv[i] % mo * fac[i - 1] % mo;
    int rem = c[i];
    for (int j = (int)(0); j <= (int)(i - 1); j++)
      rem = (rem + mo - 1ll * d[j] * a[i - j] % mo) % mo;
    d[i] = rem;
  }
  memset(d, 0, sizeof(d));
  for (int i = (int)(0); i <= (int)(k); i++)
    for (int j = (int)(0); j <= (int)(k - i); j++)
      d[i + j] = (d[i + j] + 1ll * res[i] * c[j]) % mo;
  for (int i = (int)(0); i <= (int)(k); i++) res[i] = d[i];
}
int main() {
  init();
  scanf("%d%d%d", &n, &k, &c);
  int S = (1 << c) - 1, sum = 0;
  for (int i = (int)(1); i <= (int)(n); i++) {
    int x;
    vector<int> tmp;
    scanf("%d", &x);
    for (int j = (int)(0); j <= (int)(k); j++) tmp.push_back(x ^ (x - j));
    ++mp[tmp];
    sum ^= x;
  }
  for (int i = (int)(0); i <= (int)(S); i++) cnt[i] = cnt[i / 2] + (i & 1);
  for (int i = (int)(0); i <= (int)(S); i++) {
    static int q[200], num[200];
    *q = 0;
    *vis = 0;
    for (auto j : mp) {
      int st = 0;
      for (int p = (int)(0); p <= (int)(k); p++)
        if (cnt[i & j.first[p]] & 1) st |= 1 << p;
      if (!vis[st]) vis[st] = ++*q, q[*q] = st;
      num[vis[st]] += j.second;
    }
    int res[20];
    for (int j = (int)(0); j <= (int)(k); j++) res[j] = (j == 0);
    for (int j = (int)(1); j <= (int)(*q); j++) work(res, q[j], num[j]);
    f[i] = 1ll * res[k] * fac[k] % mo;
    for (int j = (int)(1); j <= (int)(*q); j++) num[j] = vis[q[j]] = 0;
  }
  for (int i = (int)(0); i <= (int)(c - 1); i++)
    for (int j = (int)(0); j <= (int)(S); j++)
      if (!(j & (1 << i))) {
        int x = f[j], y = f[j ^ (1 << i)];
        f[j] = (x + y) * 1ll * (mo + 1) / 2 % mo;
        f[j ^ (1 << i)] = (x + mo - y) * 1ll * (mo + 1) / 2 % mo;
      }
  int key = power(n, mo - 1 - k);
  for (int j = (int)(0); j <= (int)(S); j++)
    printf("%d ", f[sum ^ j] * 1ll * key % mo);
}