#include <bits/stdc++.h>
using namespace std;
const int Z = 998244353;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  long long a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long t[n];
  copy(a, a + n, t);
  long long bs[m];
  fill(bs, bs + m, 0);
  int coe = 1;
  for (int i = 0; i < n; i++) {
    for (int j = m - 1; j >= 0; j--) {
      if (t[i] >> j & 1) {
        t[i] ^= bs[j];
      }
    }
    bool f = true;
    for (int j = m - 1; j >= 0; j--) {
      if (t[i] >> j & 1) {
        bs[j] = t[i];
        f = false;
        break;
      }
    }
    if (f) {
      coe = coe * 2 % Z;
    }
  }
  for (int i = m - 1; i >= 0; i--) {
    for (int j = i - 1; j >= 0; j--) {
      if (bs[i] >> j & 1) {
        bs[i] ^= bs[j];
      }
    }
  }
  vector<long long> b;
  b.push_back(0);
  for (int i = 0; i < m; i++) {
    if (bs[i]) {
      b.push_back(0);
      for (int j = 0; j < m; j++) {
        if (!bs[j]) {
          b.back() = (b.back() << 1) ^ (bs[i] >> j & 1);
        }
      }
    }
  }
  int sz = b.size() - 1;
  map<long long, int> dp[sz + 1][sz + 1];
  dp[0][0][0] = 1;
  for (int i = 0; i < sz; i++) {
    for (int j = 0; j <= i; j++) {
      for (auto p : dp[i][j]) {
        dp[i + 1][j][p.first] = (dp[i + 1][j][p.first] + p.second) % Z;
        dp[i + 1][j + 1][p.first ^ b[i + 1]] =
            (dp[i + 1][j + 1][p.first ^ b[i + 1]] + p.second) % Z;
      }
    }
  }
  int cnt[m + 1];
  fill(cnt, cnt + m + 1, 0);
  for (int i = 0; i <= sz; i++) {
    for (auto p : dp[sz][i]) {
      int bc = 0;
      for (int j = 0; j < m; j++) {
        bc += p.first >> j & 1;
      }
      cnt[bc + i] = (cnt[bc + i] + p.second) % Z;
    }
  }
  for (int i = 0; i <= m; i++) {
    cout << 1ll * coe * cnt[i] % Z << " \n"[i == m];
  }
  return 0;
}
