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 mod = 998244353;
const int W = 16;
int C[50][50];
int dp[W][W + 1][W][2];
int dp2[W][W + 1][W][2];
void relax(int &first, int second) {
  first += second;
  if (first >= mod) first -= mod;
}
int res[1 << W][W + 1][W];
int res2[1 << W][W + 1][W];
int bp(int first, int second) {
  if (second == 0) return 1 % mod;
  if (second == 1) return first % mod;
  if (second % 2) return ((long long)first * bp(first, second - 1)) % mod;
  int t = bp(first, second / 2);
  return ((long long)t * t) % mod;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 0; i < 50; ++i) {
    C[i][0] = 1;
    C[i][i] = 1;
    for (int j = 1; j < i; ++j) {
      C[i][j] = C[i - 1][j];
      relax(C[i][j], C[i - 1][j - 1]);
    }
  }
  int n, k, c;
  cin >> n >> k >> c;
  vector<int> v(n);
  for (auto &first : v) cin >> first;
  vector<int> ans(1 << c);
  int def_val = 0;
  vector<vector<int> > dist(W);
  for (auto first : v) {
    int rem = first % W;
    int bp = first / W;
    if (bp == 0)
      dist[0].push_back(first);
    else {
      int steps = 0;
      while (bp % 2 == 0) {
        bp /= 2;
        steps++;
      }
      def_val ^= ((first >> 4) << 4);
      dist[steps + 1].push_back(first);
    }
  }
  for (int i = 0; i < 16; ++i) {
    dp[i][0][0][0] = 1;
    for (int val : dist[i]) {
      int rem = val % W;
      for (int j = 0; j <= W; ++j)
        for (int k = 0; k < W; ++k)
          for (int e = 0; e < 2; ++e) dp2[i][j][k][e] = 0;
      for (int spent = 0; spent <= W; ++spent) {
        for (int xr = 0; xr < W; ++xr) {
          for (int e = 0; e < 2; ++e) {
            for (int tr = 0; tr + spent <= W; ++tr) {
              if (tr <= rem) {
                relax(dp2[i][spent + tr][xr ^ (rem - tr)][e],
                      ((long long)dp[i][spent][xr][e] * C[tr + spent][spent]) %
                          mod);
              } else {
                relax(dp2[i][spent + tr][xr ^ (rem - tr + W)][e ^ 1],
                      ((long long)dp[i][spent][xr][e] * C[tr + spent][spent]) %
                          mod);
              }
            }
          }
        }
      }
      for (int j = 0; j <= W; ++j)
        for (int k = 0; k < W; ++k)
          for (int e = 0; e < 2; ++e) dp[i][j][k][e] = dp2[i][j][k][e];
    }
  }
  res[0][0][0] = 1;
  for (int i = 0; i < 16; ++i) {
    for (int j = 0; j < (1 << W); ++j)
      for (int k = 0; k <= W; ++k)
        for (int e = 0; e < W; ++e) res2[j][k][e] = 0;
    for (int was = 0; was < (1 << i); ++was) {
      for (int spent = 0; spent <= W; ++spent) {
        for (int xr = 0; xr < W; ++xr) {
          if (!res[was][spent][xr]) continue;
          for (int want_s = 0; want_s + spent <= W; ++want_s) {
            for (int xt = 0; xt < W; ++xt) {
              int A =
                  ((long long)res[was][spent][xr] * dp[i][want_s][xt][0]) % mod;
              relax(res2[was][spent + want_s][xr ^ xt],
                    ((long long)A * C[spent + want_s][spent]) % mod);
              A = ((long long)res[was][spent][xr] * dp[i][want_s][xt][1]) % mod;
              relax(res2[was ^ (1 << i)][spent + want_s][xr ^ xt],
                    ((long long)A * C[spent + want_s][spent]) % mod);
            }
          }
        }
      }
    }
    for (int j = 0; j < (1 << W); ++j)
      for (int k = 0; k <= W; ++k)
        for (int e = 0; e < W; ++e) res[j][k][e] = res2[j][k][e];
  }
  int Q = bp(n, mod - 2);
  Q = bp(Q, k);
  for (int mask = 0; mask < (1 << W); ++mask) {
    int tet = 0;
    for (int i = 1; i < W; ++i) {
      if ((1 << i) & mask) {
        tet ^= (((1 << i) - 1) << 4);
      }
    }
    for (int xr = 0; xr < W; ++xr) {
      int resulting = xr ^ tet ^ def_val;
      if (!res[mask][k][xr]) continue;
      relax(ans[resulting], res[mask][k][xr]);
    }
  }
  for (auto &W : ans) {
    W = ((long long)W * Q) % mod;
  }
  for (auto W : ans) cout << W << " ";
}