#include <bits/stdc++.h>
using namespace std;
bool f[10009];
long long g[10009][24];
long long a[200009];
long long ans[209];
const long long const1 = 998244353;
long long max(long long a, long long b) {
  if (a > b) {
    return a;
  }
  return b;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<long long> v;
  for (long long i = m - 1; i >= 0; i--) {
    for (long long j = 1; j <= n; j++) {
      if (a[j] & (1ll << i)) {
        v.push_back(a[j]);
        long long x = a[j];
        for (long long k = 1; k <= n; k++) {
          if (a[k] & (1ll << i)) {
            a[k] ^= x;
          }
        }
        break;
      }
    }
  }
  long long pr = 1;
  for (long long i = 0; i < n - v.size(); i++) {
    pr = pr * 2 % const1;
  }
  vector<long long> w, u;
  w.push_back(0);
  u.push_back(0);
  for (long long i = 0; i < v.size(); i++) {
    if (v[i] >= (1ll << 12)) {
      long long d = w.size();
      for (long long j = 0; j < d; j++) {
        w.push_back(v[i] ^ w[j]);
      }
    } else {
      long long d = u.size();
      for (long long j = 0; j < d; j++) {
        u.push_back(v[i] ^ u[j]);
      }
    }
  }
  for (long long i = 0; i < u.size(); i++) {
    f[u[i]] = 1;
  }
  for (long long i = 0; i < w.size(); i++) {
    long long x = w[i];
    long long y = x >> 12;
    g[x & ((1ll << 12) - 1)][__builtin_popcount(y)]++;
  }
  for (long long x = 0; x < (1ll << 12); x++) {
    for (long long y = 0; y < (1ll << 12); y++) {
      for (long long z = 0; z <= max(0, m - 12); z++) {
        if (f[y]) {
          ans[z + __builtin_popcount(x ^ y)] += g[x][z];
        }
      }
    }
  }
  for (long long i = 0; i <= m; i++) {
    cout << ans[i] % const1 * pr % const1 << " ";
  }
  return 0;
}
