#include <bits/stdc++.h>
using namespace std;
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
  for (T& x : v) is >> x;
  return is;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  if (!v.empty()) {
    os << v.front();
    for (int i = 1; i < v.size(); ++i) os << ' ' << v[i];
  }
  return os;
}
class vector_hasher {
 public:
  std::size_t operator()(std::vector<int> const& vec) const {
    std::size_t seed = vec.size();
    for (auto& i : vec) {
      seed ^= (unsigned int)i + 0x9e3779b9 + (seed << 6) + (seed >> 2);
    }
    return seed;
  }
};
using vm = vector<int>;
const int P = 998244353;
int norm(int x) { return x >= P ? (x - P) : x; }
void add(int& x, int y) {
  if ((x += y) >= P) x -= P;
}
void sub(int& x, int y) {
  if ((x -= y) < 0) x += P;
}
void exGcd(int a, int b, int& x, int& y) {
  if (!b) {
    x = 1;
    y = 0;
    return;
  }
  exGcd(b, a % b, y, x);
  y -= a / b * x;
}
int inv(int a) {
  int x, y;
  exGcd(a, P, x, y);
  return norm(x + P);
}
int mpow(int x, int k) {
  int ret = 1;
  while (k) {
    if (k & 1) ret = ret * (long long)x % P;
    x = x * (long long)x % P;
    k >>= 1;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k, c;
  cin >> n >> k >> c;
  int mult = inv((mpow(n, k) * (1LL << c)) % P);
  vm nv(k + 1), ifac(k + 1);
  for (int i = 1; i <= k; ++i) nv[i] = inv(i);
  ifac[0] = 1;
  for (int i = 1; i <= k; ++i) ifac[i] = ifac[i - 1] * (long long)nv[i] % P;
  unordered_map<vector<int>, int, vector_hasher> mp;
  unordered_map<vector<int>, vector<vm>, vector_hasher> rmp;
  int xsum = 0;
  while (n--) {
    int x;
    cin >> x;
    xsum ^= x;
    vector<int> seq(k);
    for (int i = 1; i <= k; ++i) seq[i - 1] = x ^ (x - i);
    ++mp[seq];
  }
  vector<vm> val(k + 1, vm(1 << c));
  for (const auto& [seq, cnt] : mp) {
    vector<int> basis(c), id(c, -1), red(k);
    int dim = 0;
    auto ins = [&](int x) {
      for (int i = 0; i < c; ++i)
        if ((x >> i) & 1) {
          if (basis[i])
            x ^= basis[i];
          else {
            basis[i] = x;
            id[i] = dim++;
            return;
          }
        }
    };
    auto reduce = [&](int x) {
      int red = 0;
      for (int i = 0; i < c; ++i)
        if ((x >> i) & 1) {
          x ^= basis[i];
          red ^= 1 << id[i];
        }
      return red;
    };
    auto comb = [&](int x) {
      int ret = 0;
      for (int i = 0; i < c; ++i)
        if (id[i] != -1)
          if ((x >> id[i]) & 1) ret ^= basis[i];
      return ret;
    };
    for (int x : seq) ins(x);
    for (int i = 0; i < k; ++i) red[i] = reduce(seq[i]);
    vector<vm> ln(k + 1, vm(1 << dim));
    auto it = rmp.find(red);
    if (it == rmp.end()) {
      for (int i = 1; i <= k; ++i) {
        for (int s = 0; s != 1 << dim; ++s) {
          unsigned long long v = 0;
          for (int j = 1; j <= i; ++j)
            v += ln[i - j][s ^ red[j - 1]] * (unsigned long long)ifac[j];
          ln[i][s] = norm(P - int(v % P));
        }
        add(ln[i][red[i - 1]], ifac[i - 1]);
      }
      for (int i = 1; i <= k; ++i) {
        for (int s = 0; s != 1 << dim; ++s)
          ln[i][s] = ln[i][s] * (unsigned long long)nv[i] % P;
      }
      rmp.insert(make_pair(red, ln));
    } else
      ln = it->second;
    vector<int> remp(1 << dim);
    for (int i = 0; i != 1 << dim; ++i) remp[i] = comb(i);
    for (int i = 1; i <= k; ++i) {
      for (int s = 0; s != 1 << dim; ++s)
        val[i][remp[s]] =
            (val[i][remp[s]] + ln[i][s] * (unsigned long long)cnt) % P;
    }
  }
  auto FWT = [&](vm& vec) {
    for (int i = 0; i != c; ++i) {
      for (int s = 0; s != 1 << c; ++s) {
        if ((s >> i) & 1) {
          int a0 = vec[s ^ (1 << i)], a1 = vec[s];
          vec[s ^ (1 << i)] = norm(a0 + a1);
          vec[s] = norm(P + a0 - a1);
        }
      }
    }
  };
  for (int i = 1; i <= k; ++i) FWT(val[i]);
  vm res(1 << c);
  for (int s = 0; s != 1 << c; ++s) {
    vm f(k + 1), exp(k + 1);
    for (int i = 1; i <= k; ++i) f[i] = val[i][s] * (unsigned long long)i % P;
    exp[0] = 1;
    for (int i = 1; i <= k; ++i) {
      unsigned long long v = 0;
      for (int j = 1; j <= i; ++j) v += f[j] * (unsigned long long)exp[i - j];
      exp[i] = v % P * nv[i] % P;
    }
    res[s] = exp[k];
  }
  FWT(res);
  for (int i = 1; i <= k; ++i) mult = mult * (unsigned long long)i % P;
  for (int s = 0; s != 1 << c; ++s)
    cout << (res[s ^ xsum] * (unsigned long long)mult % P) << ' ';
  return 0;
}

### Prompt

In cpp, your task is to solve 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;
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
  for (T& x : v) is >> x;
  return is;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  if (!v.empty()) {
    os << v.front();
    for (int i = 1; i < v.size(); ++i) os << ' ' << v[i];
  }
  return os;
}
class vector_hasher {
 public:
  std::size_t operator()(std::vector<int> const& vec) const {
    std::size_t seed = vec.size();
    for (auto& i : vec) {
      seed ^= (unsigned int)i + 0x9e3779b9 + (seed << 6) + (seed >> 2);
    }
    return seed;
  }
};
using vm = vector<int>;
const int P = 998244353;
int norm(int x) { return x >= P ? (x - P) : x; }
void add(int& x, int y) {
  if ((x += y) >= P) x -= P;
}
void sub(int& x, int y) {
  if ((x -= y) < 0) x += P;
}
void exGcd(int a, int b, int& x, int& y) {
  if (!b) {
    x = 1;
    y = 0;
    return;
  }
  exGcd(b, a % b, y, x);
  y -= a / b * x;
}
int inv(int a) {
  int x, y;
  exGcd(a, P, x, y);
  return norm(x + P);
}
int mpow(int x, int k) {
  int ret = 1;
  while (k) {
    if (k & 1) ret = ret * (long long)x % P;
    x = x * (long long)x % P;
    k >>= 1;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k, c;
  cin >> n >> k >> c;
  int mult = inv((mpow(n, k) * (1LL << c)) % P);
  vm nv(k + 1), ifac(k + 1);
  for (int i = 1; i <= k; ++i) nv[i] = inv(i);
  ifac[0] = 1;
  for (int i = 1; i <= k; ++i) ifac[i] = ifac[i - 1] * (long long)nv[i] % P;
  unordered_map<vector<int>, int, vector_hasher> mp;
  unordered_map<vector<int>, vector<vm>, vector_hasher> rmp;
  int xsum = 0;
  while (n--) {
    int x;
    cin >> x;
    xsum ^= x;
    vector<int> seq(k);
    for (int i = 1; i <= k; ++i) seq[i - 1] = x ^ (x - i);
    ++mp[seq];
  }
  vector<vm> val(k + 1, vm(1 << c));
  for (const auto& [seq, cnt] : mp) {
    vector<int> basis(c), id(c, -1), red(k);
    int dim = 0;
    auto ins = [&](int x) {
      for (int i = 0; i < c; ++i)
        if ((x >> i) & 1) {
          if (basis[i])
            x ^= basis[i];
          else {
            basis[i] = x;
            id[i] = dim++;
            return;
          }
        }
    };
    auto reduce = [&](int x) {
      int red = 0;
      for (int i = 0; i < c; ++i)
        if ((x >> i) & 1) {
          x ^= basis[i];
          red ^= 1 << id[i];
        }
      return red;
    };
    auto comb = [&](int x) {
      int ret = 0;
      for (int i = 0; i < c; ++i)
        if (id[i] != -1)
          if ((x >> id[i]) & 1) ret ^= basis[i];
      return ret;
    };
    for (int x : seq) ins(x);
    for (int i = 0; i < k; ++i) red[i] = reduce(seq[i]);
    vector<vm> ln(k + 1, vm(1 << dim));
    auto it = rmp.find(red);
    if (it == rmp.end()) {
      for (int i = 1; i <= k; ++i) {
        for (int s = 0; s != 1 << dim; ++s) {
          unsigned long long v = 0;
          for (int j = 1; j <= i; ++j)
            v += ln[i - j][s ^ red[j - 1]] * (unsigned long long)ifac[j];
          ln[i][s] = norm(P - int(v % P));
        }
        add(ln[i][red[i - 1]], ifac[i - 1]);
      }
      for (int i = 1; i <= k; ++i) {
        for (int s = 0; s != 1 << dim; ++s)
          ln[i][s] = ln[i][s] * (unsigned long long)nv[i] % P;
      }
      rmp.insert(make_pair(red, ln));
    } else
      ln = it->second;
    vector<int> remp(1 << dim);
    for (int i = 0; i != 1 << dim; ++i) remp[i] = comb(i);
    for (int i = 1; i <= k; ++i) {
      for (int s = 0; s != 1 << dim; ++s)
        val[i][remp[s]] =
            (val[i][remp[s]] + ln[i][s] * (unsigned long long)cnt) % P;
    }
  }
  auto FWT = [&](vm& vec) {
    for (int i = 0; i != c; ++i) {
      for (int s = 0; s != 1 << c; ++s) {
        if ((s >> i) & 1) {
          int a0 = vec[s ^ (1 << i)], a1 = vec[s];
          vec[s ^ (1 << i)] = norm(a0 + a1);
          vec[s] = norm(P + a0 - a1);
        }
      }
    }
  };
  for (int i = 1; i <= k; ++i) FWT(val[i]);
  vm res(1 << c);
  for (int s = 0; s != 1 << c; ++s) {
    vm f(k + 1), exp(k + 1);
    for (int i = 1; i <= k; ++i) f[i] = val[i][s] * (unsigned long long)i % P;
    exp[0] = 1;
    for (int i = 1; i <= k; ++i) {
      unsigned long long v = 0;
      for (int j = 1; j <= i; ++j) v += f[j] * (unsigned long long)exp[i - j];
      exp[i] = v % P * nv[i] % P;
    }
    res[s] = exp[k];
  }
  FWT(res);
  for (int i = 1; i <= k; ++i) mult = mult * (unsigned long long)i % P;
  for (int s = 0; s != 1 << c; ++s)
    cout << (res[s ^ xsum] * (unsigned long long)mult % P) << ' ';
  return 0;
}

```