#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &t) {
  t = 0;
  char ch = getchar();
  int f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  do {
    (t *= 10) += ch - '0';
    ch = getchar();
  } while ('0' <= ch && ch <= '9');
  t *= f;
}
const long long mod = 998244353;
const int maxn = (2e5) + 10;
int n, m;
long long a[maxn], mi, b[70], dp[70][1 << 18], ans[70];
long long cnt(long long x) {
  int cnt = 0;
  while (x) cnt += x & 1, x >>= 1;
  return cnt;
}
int t1, t2, p1[70], p2[70];
void solve1() {
  long long x;
  for (int t = 0; t < (1 << t2); t++) {
    x = 0;
    for (int i = 1; i <= t2; i++)
      if (t & (1 << (i - 1))) x ^= b[p2[i]];
    ans[cnt(x)]++;
  }
}
void update(long long &x, long long y) {
  x += y;
  if (x >= mod) x -= mod;
}
void solve2() {
  long long x;
  dp[0][0] = 1;
  for (int i = 1; i <= t2; i++) {
    x = 0;
    for (int j = 1; j <= t1; j++)
      if (b[p2[i]] & (1LL << p1[j])) x += 1 << (j - 1);
    for (int j = t2; j >= 0; j--) {
      for (int t = 0; t < (1 << t1); t++) update(dp[j + 1][t ^ x], dp[j][t]);
    }
  }
  for (int j = 0; j <= t2; j++)
    for (int t = 0; t < (1 << t1); t++) update(ans[j + cnt(t)], dp[j][t]);
}
int main() {
  read(n);
  read(m);
  for (int i = 1; i <= n; i++) read(a[i]);
  mi = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = m; j >= 0; j--)
      if (a[i] & (1LL << j)) {
        if (!b[j]) {
          b[j] = a[i];
          break;
        }
        a[i] ^= b[j];
      }
    if (!a[i]) mi = mi * 2 % mod;
  }
  for (int i = m; i >= 0; i--) {
    if (!b[i]) {
      p1[++t1] = i;
      continue;
    }
    p2[++t2] = i;
    for (int j = i + 1; j <= m; j++)
      if (b[j] & (1LL << i)) b[j] ^= b[i];
  }
  if (t2 <= 17)
    solve1();
  else
    solve2();
  for (int i = 0; i <= m; i++) printf("%lld ", ans[i] * mi % mod);
  printf("\n");
  return 0;
}
