#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = long double;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll mod) { return (ull)rng() % mod; }
const ll maxc = 16;
const ll small_mask = 15;
const ll max_vals = small_mask * maxc;
const ll maxn = (1 << maxc);
const ll mod = 998244353;
const ll modmod = (ll)mod * (ll)mod;
const ll DEBUG = 0;
ll fact[2 * maxn], inv_fact[2 * maxn];
ll n, k, c, a[maxn];
vector<pair<ll, ll>> es[max_vals][maxc + 1];
ll cnt_vals = 0;
ll cnt[max_vals], val[max_vals], val_to_id[maxn];
ll dp[maxc + 1][maxn], dpnext[maxc + 1][maxn];
ll my_pw(ll x, ll y) {
  if (y == 0) return 1;
  if (y & 1)
    return my_pw(x, y - 1) * x % mod;
  else
    return my_pw(x * x % mod, y / 2);
}
ll cnk(ll n, ll k) {
  assert(0 <= n && n < 2 * maxn);
  assert(0 <= k && k <= n);
  return fact[n] * inv_fact[k] % mod * inv_fact[n - k] % mod;
}
void add(ll& x, ll y) {
  x += y;
  if (x >= mod) x -= mod;
}
void lladd(ll& x, ll y) {
  x += y;
  if (x >= modmod) x -= modmod;
}
void go(ll i, ll x, ll taked, ll etaked, ll mult, ll prevj, ll prevj_cnt) {
  ll y = x;
  if ((cnt[i] - taked) & 1) {
    y ^= val[i];
  }
  assert(mult >= 0);
  assert(mult < mod);
  assert(x < maxn);
  es[i][etaked].push_back({y, (ll)mult});
  if (taked == cnt[i]) return;
  for (ll j = 1; j <= min(k - etaked, prevj); ++j) {
    ll tmult = mult;
    ll tprevj_cnt = 1;
    if (j != prevj) {
      tmult = tmult * (cnt[i] - taked) % mod;
    } else {
      tprevj_cnt = prevj_cnt + 1;
      assert(cnt[i] - taked + prevj_cnt >= tprevj_cnt);
      tmult = tmult *
              my_pw(cnk(cnt[i] - taked + prevj_cnt, prevj_cnt), mod - 2) % mod *
              cnk(cnt[i] - taked + prevj_cnt, tprevj_cnt) % mod;
    }
    tmult = tmult * inv_fact[j] % mod;
    go(i, x ^ (val[i] - j), taked + 1, etaked + j, tmult, j, tprevj_cnt);
  }
}
ll stupid_ans[maxn];
void stupid_go(ll i, ll j, ll x) {
  if (i == n) {
    if (j == k) {
      ++stupid_ans[x];
    }
    return;
  }
  for (ll l = 0; l + j <= k; ++l) {
    stupid_go(i + 1, j + l, x ^ (a[i] - l));
  }
}
void stupid() {
  memset(stupid_ans, 0, sizeof stupid_ans);
  stupid_go(0, 0, 0);
  ll ans_mult = my_pw(cnk(n + k - 1, k), mod - 2);
  for (ll i = 0; i < maxn; ++i) {
    stupid_ans[i] = (ll)stupid_ans[i] * ans_mult % mod;
  }
}
void solve() {
  fact[0] = 1;
  inv_fact[0] = 1;
  for (ll i = 1; i < 2 * maxn; ++i) {
    fact[i] = fact[i - 1] * (ll)i % mod;
    inv_fact[i] = my_pw(fact[i], mod - 2);
  }
  cnt_vals = 0;
  for (ll i = 0; i <= small_mask; ++i) {
    val[cnt_vals++] = i;
    for (ll j = 4; j < maxc; ++j) {
      val[cnt_vals++] = (1 << j) + i;
    }
  }
  sort(val, val + cnt_vals);
  for (ll i = 0; i < cnt_vals; ++i) {
    for (ll j = 0; j <= maxc; ++j) {
      es[i][j].clear();
    }
    val_to_id[val[i]] = i;
  }
  if (!DEBUG) {
    cin >> n >> k >> c;
  } else {
    n = 8;
    k = 16;
    c = 10;
  }
  ll pref_ans = 0;
  memset(cnt, 0, sizeof cnt);
  for (ll i = 0; i < n; ++i) {
    if (!DEBUG) {
      cin >> a[i];
    } else {
      a[i] = k + rand() % (1);
    }
    for (ll j = 1; j <= maxc; ++j) {
      ll x = (a[i] & ((1 << j) - 1));
      if (x >= k) {
        ++cnt[val_to_id[x]];
        pref_ans ^= (a[i] ^ x);
        break;
      }
    }
  }
  ll es_size = 0;
  for (ll i = 0; i < cnt_vals; ++i) {
    go(i, 0, 0, 0, 1, k + 1, 0);
    for (ll j = 0; j <= maxc; ++j) {
      es_size += es[i][j].size();
    }
  }
  memset(dp, 0, sizeof dp);
  memset(dpnext, 0, sizeof dpnext);
  dpnext[0][pref_ans] = fact[k];
  for (ll i = 0; i < cnt_vals; ++i) {
    swap(dp, dpnext);
    memset(dpnext, 0, sizeof dpnext);
    for (ll j = 0; j <= k; ++j) {
      for (ll mask = 0; mask < maxn; ++mask) {
        if (dp[j][mask] == 0) continue;
        ll dp_val = dp[j][mask] % mod;
        assert(dp_val >= 0);
        for (ll l = 0; j + l <= k; ++l) {
          for (auto [x, mult] : es[i][l]) {
            ll to_add = dp_val * (ll)mult;
            dpnext[j + l][mask ^ x] = (dpnext[j + l][mask ^ x] + to_add) % mod;
          }
        }
      }
    }
  }
  if (DEBUG) {
    stupid();
  }
  assert(k <= n + k - 1);
  ll ans_mult = my_pw(my_pw(n, k), mod - 2);
  for (ll mask = 0; mask < (1 << c); ++mask) {
    ll ans = dpnext[k][mask] % mod;
    ans = ans * ans_mult % mod;
    if (!DEBUG) {
      cout << ans << " ";
    } else {
      if (ans != stupid_ans[mask]) {
        cout << "FUCK" << endl;
        cout << n << " " << k << " " << c << endl;
        for (ll i = 0; i < n; ++i) {
          cout << a[i] << " ";
        }
        cout << endl;
        cout << mask << " : " << ans << " != " << stupid_ans[mask] << endl;
        exit(0);
      }
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(20);
  ll T = 1 + DEBUG * 100;
  for (ll numt = 0; numt < T; ++numt) {
    solve();
    if (DEBUG) {
      cout << numt << " ended" << endl;
    }
  }
}

### 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;
using ll = long long;
using ull = unsigned long long;
using dbl = long double;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll mod) { return (ull)rng() % mod; }
const ll maxc = 16;
const ll small_mask = 15;
const ll max_vals = small_mask * maxc;
const ll maxn = (1 << maxc);
const ll mod = 998244353;
const ll modmod = (ll)mod * (ll)mod;
const ll DEBUG = 0;
ll fact[2 * maxn], inv_fact[2 * maxn];
ll n, k, c, a[maxn];
vector<pair<ll, ll>> es[max_vals][maxc + 1];
ll cnt_vals = 0;
ll cnt[max_vals], val[max_vals], val_to_id[maxn];
ll dp[maxc + 1][maxn], dpnext[maxc + 1][maxn];
ll my_pw(ll x, ll y) {
  if (y == 0) return 1;
  if (y & 1)
    return my_pw(x, y - 1) * x % mod;
  else
    return my_pw(x * x % mod, y / 2);
}
ll cnk(ll n, ll k) {
  assert(0 <= n && n < 2 * maxn);
  assert(0 <= k && k <= n);
  return fact[n] * inv_fact[k] % mod * inv_fact[n - k] % mod;
}
void add(ll& x, ll y) {
  x += y;
  if (x >= mod) x -= mod;
}
void lladd(ll& x, ll y) {
  x += y;
  if (x >= modmod) x -= modmod;
}
void go(ll i, ll x, ll taked, ll etaked, ll mult, ll prevj, ll prevj_cnt) {
  ll y = x;
  if ((cnt[i] - taked) & 1) {
    y ^= val[i];
  }
  assert(mult >= 0);
  assert(mult < mod);
  assert(x < maxn);
  es[i][etaked].push_back({y, (ll)mult});
  if (taked == cnt[i]) return;
  for (ll j = 1; j <= min(k - etaked, prevj); ++j) {
    ll tmult = mult;
    ll tprevj_cnt = 1;
    if (j != prevj) {
      tmult = tmult * (cnt[i] - taked) % mod;
    } else {
      tprevj_cnt = prevj_cnt + 1;
      assert(cnt[i] - taked + prevj_cnt >= tprevj_cnt);
      tmult = tmult *
              my_pw(cnk(cnt[i] - taked + prevj_cnt, prevj_cnt), mod - 2) % mod *
              cnk(cnt[i] - taked + prevj_cnt, tprevj_cnt) % mod;
    }
    tmult = tmult * inv_fact[j] % mod;
    go(i, x ^ (val[i] - j), taked + 1, etaked + j, tmult, j, tprevj_cnt);
  }
}
ll stupid_ans[maxn];
void stupid_go(ll i, ll j, ll x) {
  if (i == n) {
    if (j == k) {
      ++stupid_ans[x];
    }
    return;
  }
  for (ll l = 0; l + j <= k; ++l) {
    stupid_go(i + 1, j + l, x ^ (a[i] - l));
  }
}
void stupid() {
  memset(stupid_ans, 0, sizeof stupid_ans);
  stupid_go(0, 0, 0);
  ll ans_mult = my_pw(cnk(n + k - 1, k), mod - 2);
  for (ll i = 0; i < maxn; ++i) {
    stupid_ans[i] = (ll)stupid_ans[i] * ans_mult % mod;
  }
}
void solve() {
  fact[0] = 1;
  inv_fact[0] = 1;
  for (ll i = 1; i < 2 * maxn; ++i) {
    fact[i] = fact[i - 1] * (ll)i % mod;
    inv_fact[i] = my_pw(fact[i], mod - 2);
  }
  cnt_vals = 0;
  for (ll i = 0; i <= small_mask; ++i) {
    val[cnt_vals++] = i;
    for (ll j = 4; j < maxc; ++j) {
      val[cnt_vals++] = (1 << j) + i;
    }
  }
  sort(val, val + cnt_vals);
  for (ll i = 0; i < cnt_vals; ++i) {
    for (ll j = 0; j <= maxc; ++j) {
      es[i][j].clear();
    }
    val_to_id[val[i]] = i;
  }
  if (!DEBUG) {
    cin >> n >> k >> c;
  } else {
    n = 8;
    k = 16;
    c = 10;
  }
  ll pref_ans = 0;
  memset(cnt, 0, sizeof cnt);
  for (ll i = 0; i < n; ++i) {
    if (!DEBUG) {
      cin >> a[i];
    } else {
      a[i] = k + rand() % (1);
    }
    for (ll j = 1; j <= maxc; ++j) {
      ll x = (a[i] & ((1 << j) - 1));
      if (x >= k) {
        ++cnt[val_to_id[x]];
        pref_ans ^= (a[i] ^ x);
        break;
      }
    }
  }
  ll es_size = 0;
  for (ll i = 0; i < cnt_vals; ++i) {
    go(i, 0, 0, 0, 1, k + 1, 0);
    for (ll j = 0; j <= maxc; ++j) {
      es_size += es[i][j].size();
    }
  }
  memset(dp, 0, sizeof dp);
  memset(dpnext, 0, sizeof dpnext);
  dpnext[0][pref_ans] = fact[k];
  for (ll i = 0; i < cnt_vals; ++i) {
    swap(dp, dpnext);
    memset(dpnext, 0, sizeof dpnext);
    for (ll j = 0; j <= k; ++j) {
      for (ll mask = 0; mask < maxn; ++mask) {
        if (dp[j][mask] == 0) continue;
        ll dp_val = dp[j][mask] % mod;
        assert(dp_val >= 0);
        for (ll l = 0; j + l <= k; ++l) {
          for (auto [x, mult] : es[i][l]) {
            ll to_add = dp_val * (ll)mult;
            dpnext[j + l][mask ^ x] = (dpnext[j + l][mask ^ x] + to_add) % mod;
          }
        }
      }
    }
  }
  if (DEBUG) {
    stupid();
  }
  assert(k <= n + k - 1);
  ll ans_mult = my_pw(my_pw(n, k), mod - 2);
  for (ll mask = 0; mask < (1 << c); ++mask) {
    ll ans = dpnext[k][mask] % mod;
    ans = ans * ans_mult % mod;
    if (!DEBUG) {
      cout << ans << " ";
    } else {
      if (ans != stupid_ans[mask]) {
        cout << "FUCK" << endl;
        cout << n << " " << k << " " << c << endl;
        for (ll i = 0; i < n; ++i) {
          cout << a[i] << " ";
        }
        cout << endl;
        cout << mask << " : " << ans << " != " << stupid_ans[mask] << endl;
        exit(0);
      }
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(20);
  ll T = 1 + DEBUG * 100;
  for (ll numt = 0; numt < T; ++numt) {
    solve();
    if (DEBUG) {
      cout << numt << " ended" << endl;
    }
  }
}

```