#include <bits/stdc++.h>
using namespace std;
const long long p = 998244353;
const long long maxn = (1 << 16) + 5;
long long cnt[maxn];
vector<vector<long long> > dp;
long long k;
long long c;
long long c1[20][20];
long long maxbit(long long x) {
  for (long long i = 16; i >= 0; i--) {
    if (x & (1 << i)) {
      return i;
    }
  }
}
long long po(long long a, long long b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b % 2 == 0) {
    long long u = po(a, b / 2);
    return (u * u) % p;
  } else {
    long long u = po(a, b - 1);
    return (a * u) % p;
  }
}
long long inv(long long x) { return po(x, p - 2); }
vector<vector<long long> > build(
    vector<pair<long long, pair<long long, long long> > > g) {
  vector<vector<long long> > answ(k + 1);
  for (long long i = 0; i <= k; ++i) {
    answ[i].resize(1 << c);
    for (long long j = 0; j < (1 << c); ++j) answ[i][j] = 0;
  }
  for (auto h : g) {
    answ[h.second.first][h.second.second] = h.first;
  }
  return answ;
}
vector<pair<long long, pair<long long, long long> > > mul1(
    vector<pair<long long, pair<long long, long long> > > a,
    vector<pair<long long, pair<long long, long long> > > b) {
  map<pair<long long, long long>, long long> m;
  vector<pair<long long, long long> > keys;
  vector<pair<long long, pair<long long, long long> > > ans;
  for (auto h1 : a) {
    for (auto h2 : b) {
      if ((h1.second.first + h2.second.first) <= k) {
        pair<long long, pair<long long, long long> > z = {
            (h1.first * h2.first) % p *
                c1[h1.second.first + h2.second.first][h1.second.first],
            {h1.second.first + h2.second.first,
             h1.second.second ^ h2.second.second}};
        if (m.count(z.second)) {
          m[z.second] = (m[z.second] + z.first) % p;
        } else {
          m[z.second] = (z.first % p);
          keys.push_back(z.second);
        }
      }
    }
  }
  for (auto z : keys) {
    ans.push_back({m[z], z});
  }
  return ans;
}
vector<vector<long long> > answ;
void mul(vector<vector<long long> > &a, vector<vector<long long> > b) {
  vector<pair<long long, long long> > used1;
  vector<pair<long long, long long> > used2;
  for (long long i = 0; i <= k; ++i) {
    for (long long j = 0; j < (1 << c); ++j) {
      if (a[i][j]) used1.push_back({i, j});
      if (b[i][j]) used2.push_back({i, j});
    }
  }
  for (long long i = 0; i <= k; ++i)
    for (long long j = 0; j < (1 << c); ++j) answ[i][j] = 0;
  for (auto h1 : used1) {
    for (auto h2 : used2) {
      if ((h1.first + h2.first) <= k) {
        answ[h1.first + h2.first][h1.second ^ h2.second] +=
            ((a[h1.first][h1.second] * b[h2.first][h2.second]) % p) *
            c1[h1.first + h2.first][h1.first];
        answ[h1.first + h2.first][h1.second ^ h2.second] %= p;
      }
    }
  }
  a = answ;
}
vector<pair<long long, pair<long long, long long> > > degree(
    vector<pair<long long, pair<long long, long long> > > h, long long x) {
  if (x == 1) return h;
  if (x % 2 == 0) {
    vector<pair<long long, pair<long long, long long> > > ans1 =
        degree(h, x / 2);
    return mul1(ans1, ans1);
  } else {
    vector<pair<long long, pair<long long, long long> > > ans1 =
        degree(h, x - 1);
    return mul1(ans1, h);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  for (long long i = 0; i < 20; ++i) {
    for (long long j = 0; j < 20; ++j) {
      if (i < j) {
        c1[i][j] = 0;
        continue;
      }
      if (i == j || j == 0) {
        c1[i][j] = 1;
        continue;
      }
      c1[i][j] = c1[i - 1][j - 1] + c1[i - 1][j];
      c1[i][j] %= p;
    }
  }
  long long n;
  cin >> n >> k >> c;
  answ.resize(k + 1);
  for (long long i = 0; i <= k; ++i) answ[i].resize(1 << c);
  long long a[n];
  long long o1 = 0;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    o1 ^= a[i];
  }
  long long b[n];
  for (long long i = 0; i < n; ++i) {
    long long x = a[i];
    while (true) {
      long long u = maxbit(x);
      if ((x - (1 << u)) >= k) {
        x -= (1 << u);
      } else {
        break;
      }
    }
    b[i] = x;
  }
  sort(b, b + n);
  for (long long i = 0; i < n; ++i) {
    cnt[b[i]]++;
  }
  dp.resize(k + 1);
  for (long long i = 0; i <= k; ++i) {
    dp[i].resize(1 << c);
    for (long long j = 0; j < (1 << c); ++j) {
      dp[i][j] = 0;
    }
  }
  dp[0][0] = 1;
  for (long long i = 0; i < (1 << c); ++i) {
    if (!cnt[i]) continue;
    vector<pair<long long, pair<long long, long long> > > h;
    for (long long j = 0; j <= k; ++j) {
      h.push_back({1, {j, i ^ (i - j)}});
    }
    vector<pair<long long, pair<long long, long long> > > g = degree(h, cnt[i]);
    mul(dp, build(g));
  }
  vector<long long> ans(1 << c);
  for (long long i = 0; i < (1 << c); ++i) {
    ans[i ^ o1] = dp[k][i];
  }
  for (long long i = 0; i < (1 << c); ++i) {
    ans[i] *= po(inv(n), k);
    ans[i] %= p;
  }
  for (long long i = 0; i < (1 << c); ++i) cout << ans[i] << ' ';
  return 0;
}
