#include <bits/stdc++.h>
using namespace std;
const long long N = 57;
const long long M = 262144;
const long long INF = 1e9 + 7;
const long long mod = 998244353;
long long Pow(long long x, long long y) {
  long long ans = 1, now = x;
  while (y) {
    if (y & 1) ans = ans * now % mod;
    now = now * now % mod;
    y >>= 1;
  }
  return ans;
}
long long n, m, ss = 0, st = 0;
long long t[N], a[N], bc[M], u[N], b[N], g[N], p[N][N], f[N], h[N][N], fac[N],
    inv[N];
long long Bc(long long x) { return bc[x / M / M] + bc[x / M % M] + bc[x % M]; }
long long C(long long x, long long y) {
  if (x < y || y < 0) return 0;
  return fac[x] * inv[y] % mod * inv[x - y] % mod;
}
void dfs1(long long x, long long v) {
  if (x == ss + 1) {
    u[Bc(v)]++;
    return;
  }
  dfs1(x + 1, v);
  dfs1(x + 1, v ^ t[a[x]]);
}
void dfs2(long long x, long long v, long long s) {
  if (x == st + 1) {
    p[s][Bc(v)]++;
    return;
  }
  dfs2(x + 1, v, s);
  dfs2(x + 1, v ^ g[x], s + 1);
}
int main() {
  scanf("%lld%lld", &n, &m);
  for (long long i = 1; i <= n; i++) {
    long long x;
    scanf("%lld", &x);
    for (long long j = m - 1; ~j; j--) {
      if ((x >> j) & 1ll) {
        if (!t[j]) {
          t[j] = x;
          break;
        }
        x ^= t[j];
      }
    }
  }
  for (long long i = 0; i <= M - 1; i++) {
    long long nw = i;
    bc[i] = 0;
    while (nw) {
      bc[i] += (nw & 1);
      nw >>= 1;
    }
  }
  for (long long i = 0; i <= m - 1; i++)
    if (t[i])
      a[++ss] = i;
    else
      b[++st] = i;
  long long pw = 1;
  for (long long i = 1; i <= n - ss; i++) pw = (pw + pw) % mod;
  if (ss <= (m + 1) / 2) {
    dfs1(1, 0);
    for (long long i = 0; i <= m + 1 - 1; i++) printf("%lld ", u[i] * pw % mod);
  } else {
    fac[0] = 1;
    for (long long i = 1; i <= st; i++) fac[i] = fac[i - 1] * i % mod;
    inv[st] = Pow(fac[st], mod - 2);
    for (long long i = st; i; i--) inv[i - 1] = inv[i] * i % mod;
    for (long long i = 0; i <= st + 1 - 1; i++) {
      for (long long j = 0; j <= st + 1 - 1; j++) {
        h[i][j] = 0;
        for (long long k = 0; k <= i + 1 - 1; k++) {
          if (k & 1)
            h[i][j] = (h[i][j] - C(i, k) * C(st - i, j - k) % mod + mod) % mod;
          else
            h[i][j] = (h[i][j] + C(i, k) * C(st - i, j - k)) % mod;
        }
      }
    }
    for (long long i = 0; i <= m - 1; i++)
      if (t[i])
        for (long long j = i + 1; j <= m - 1; j++)
          if ((t[j] >> i) & 1) t[j] ^= t[i];
    for (long long i = 1; i <= st; i++) {
      g[i] = 0;
      for (long long j = 1; j <= ss; j++)
        g[i] = (g[i] << 1) | ((t[a[j]] >> b[i]) & 1);
    }
    dfs2(1, 0, 0);
    for (long long j = 0; j <= ss + 1 - 1; j++) {
      for (long long i = 0; i <= ss + 1 - 1; i++) f[i] = 0;
      f[0] = 1;
      for (long long i = 1; i <= ss - j; i++)
        for (long long k = ss; k; k--) f[k] = (f[k] + f[k - 1]) % mod;
      for (long long i = 1; i <= j; i++)
        for (long long k = ss; k; k--) f[k] = (f[k] - f[k - 1] + mod) % mod;
      for (long long i = 0; i <= ss + 1 - 1; i++)
        for (long long k = 0; k <= st + 1 - 1; k++)
          for (long long o = 0; o <= st + 1 - 1; o++)
            u[i + o] = (u[i + o] + p[k][j] * h[k][o] % mod * f[i]) % mod;
    }
    long long iv = Pow(Pow(2, st), mod - 2);
    for (long long i = 0; i <= m + 1 - 1; i++)
      printf("%lld ", u[i] * iv % mod * pw % mod);
    puts("");
  }
  return 0;
}
