#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int nega = 1;
  while (!isdigit(ch)) {
    if (ch == '-') nega = -1;
    ch = getchar();
  }
  int ans = 0;
  while (isdigit(ch)) {
    ans = ans * 10 + ch - 48;
    ch = getchar();
  }
  if (nega == -1) return -ans;
  return ans;
}
void print(vector<int> x) {
  for (int i = 0; i < (int)x.size(); i++)
    printf("%d%c", x[i], " \n"[i == (int)x.size() - 1]);
}
inline int add(int x, int y) {
  return x + y >= 998244353 ? x + y - 998244353 : x + y;
}
inline int add(int x, int y, int z) { return add(add(x, y), z); }
inline int sub(int x, int y) { return x - y < 0 ? x - y + 998244353 : x - y; }
inline int mul(int x, int y) { return 1ULL * x * y % 998244353; }
inline int mul(int x, int y, int z) { return mul(mul(x, y), z); }
int qpow(int x, int y) {
  int ans = 1;
  while (y) {
    if (y & 1) ans = mul(ans, x);
    x = mul(x, x);
    y >>= 1;
  }
  return ans;
}
int Inv(int x) { return qpow(x, 998244353 - 2); }
int a[65536], C[25][25], ans[65536], v[65536], id[65536], n, k, c;
unsigned long long f[65536 / 2][20];
signed main() {
  cin >> n >> k >> c;
  for (int i = 1; i <= n; i++) a[i] = read();
  C[0][0] = 1;
  for (int i = 1; i < 25; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++) C[i][j] = add(C[i - 1][j - 1], C[i - 1][j]);
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= k; j++) v[i] = max(v[i], a[i] ^ (a[i] - j));
  for (int i = 1; i <= n; i++) id[i] = i;
  sort(id + 1, id + n + 1, [&](int x, int y) { return v[x] < v[y]; });
  f[0][0] = 1;
  int pw = 0;
  for (int d = 1; d <= n; d++) {
    int val = a[id[d]];
    while (1 << pw <= (v[id[d]] / 2)) pw++;
    for (int i = k - 1; i >= 0; i--)
      for (int j = 0; j < 1 << pw; j++) {
        for (int c = 1; c <= k - i; c++)
          f[j ^ ((val ^ (val - c)) / 2)][i + c] += f[j][i] * C[k - i][c];
      }
    for (int j = 0; j < 1 << pw; j++)
      for (int i = 0; i <= k; i++) f[j][i] %= 998244353;
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) sum ^= a[i];
  for (int i = 0; i < 1 << pw; i++) ans[(i * 2) ^ sum ^ (k & 1)] += f[i][k];
  int ipw = Inv(qpow(n, k));
  for (int i = 0; i < 1 << c; i++)
    printf("%d%c", mul(ans[i], ipw), " \n"[i == (1 << c) - 1]);
  return 0;
}

### Prompt

Please formulate a CPP solution to the following 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 

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int nega = 1;
  while (!isdigit(ch)) {
    if (ch == '-') nega = -1;
    ch = getchar();
  }
  int ans = 0;
  while (isdigit(ch)) {
    ans = ans * 10 + ch - 48;
    ch = getchar();
  }
  if (nega == -1) return -ans;
  return ans;
}
void print(vector<int> x) {
  for (int i = 0; i < (int)x.size(); i++)
    printf("%d%c", x[i], " \n"[i == (int)x.size() - 1]);
}
inline int add(int x, int y) {
  return x + y >= 998244353 ? x + y - 998244353 : x + y;
}
inline int add(int x, int y, int z) { return add(add(x, y), z); }
inline int sub(int x, int y) { return x - y < 0 ? x - y + 998244353 : x - y; }
inline int mul(int x, int y) { return 1ULL * x * y % 998244353; }
inline int mul(int x, int y, int z) { return mul(mul(x, y), z); }
int qpow(int x, int y) {
  int ans = 1;
  while (y) {
    if (y & 1) ans = mul(ans, x);
    x = mul(x, x);
    y >>= 1;
  }
  return ans;
}
int Inv(int x) { return qpow(x, 998244353 - 2); }
int a[65536], C[25][25], ans[65536], v[65536], id[65536], n, k, c;
unsigned long long f[65536 / 2][20];
signed main() {
  cin >> n >> k >> c;
  for (int i = 1; i <= n; i++) a[i] = read();
  C[0][0] = 1;
  for (int i = 1; i < 25; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++) C[i][j] = add(C[i - 1][j - 1], C[i - 1][j]);
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= k; j++) v[i] = max(v[i], a[i] ^ (a[i] - j));
  for (int i = 1; i <= n; i++) id[i] = i;
  sort(id + 1, id + n + 1, [&](int x, int y) { return v[x] < v[y]; });
  f[0][0] = 1;
  int pw = 0;
  for (int d = 1; d <= n; d++) {
    int val = a[id[d]];
    while (1 << pw <= (v[id[d]] / 2)) pw++;
    for (int i = k - 1; i >= 0; i--)
      for (int j = 0; j < 1 << pw; j++) {
        for (int c = 1; c <= k - i; c++)
          f[j ^ ((val ^ (val - c)) / 2)][i + c] += f[j][i] * C[k - i][c];
      }
    for (int j = 0; j < 1 << pw; j++)
      for (int i = 0; i <= k; i++) f[j][i] %= 998244353;
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) sum ^= a[i];
  for (int i = 0; i < 1 << pw; i++) ans[(i * 2) ^ sum ^ (k & 1)] += f[i][k];
  int ipw = Inv(qpow(n, k));
  for (int i = 0; i < 1 << c; i++)
    printf("%d%c", mul(ans[i], ipw), " \n"[i == (1 << c) - 1]);
  return 0;
}

```