#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1, c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f == 1 ? x : -x;
}
const long long M = 60, mod = 998244353, inv2 = (mod + 1) >> 1;
long long n, m, cou, c[M], a[M], p[M], b[M], C[M][M];
void dfs(long long p, long long x) {
  if (p == cou) {
    c[__builtin_popcountll(x)]++;
    return;
  }
  dfs(p + 1, x);
  dfs(p + 1, x ^ a[p]);
}
signed main() {
  n = read();
  m = read();
  for (long long i = 1, x; i <= n; i++) {
    x = read();
    for (long long j = 0; j < m; j++)
      if ((x >> j) & 1) {
        if (!p[j]) {
          p[j] = x;
          break;
        }
        x ^= p[j];
      }
  }
  for (long long i = m - 1; i >= 0; i--)
    if (p[i]) {
      for (long long j = i + 1; j < m; j++)
        if (((p[i] >> j) & 1) && p[j]) p[i] ^= p[j];
    }
  for (long long i = 0, x, y; i < m; i++)
    if (p[i]) {
      a[cou] = p[i];
      if (cou != i) {
        for (long long j = 0; j <= cou; j++) {
          x = (a[j] >> cou) & 1;
          y = (a[j] >> i) & 1;
          if (x ^ y) {
            a[j] ^= (1ll << cou);
            a[j] ^= (1ll << i);
          }
        }
      }
      cou++;
    }
  if (cou <= 26) {
    dfs(0, 0);
    for (long long i = 0; i <= m; i++) {
      for (long long j = 1; j <= n - cou; j++) c[i] = c[i] * 2 % mod;
      cout << c[i] << " ";
    }
    return (0 - 0);
  }
  for (long long i = 0; i < cou; i++) {
    for (long long j = cou; j < m; j++)
      if ((a[i] >> j) & 1) b[j - cou] |= 1ll << i;
  }
  for (long long i = 0; i < m - cou; i++) a[i] = b[i] | 1ll << (i + cou);
  cou = m - cou;
  dfs(0, 0);
  for (long long i = 0; i <= m; i++) {
    C[i][0] = 1;
    for (long long j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % mod;
  }
  for (long long i = 0, ans, res; i <= m; i++) {
    ans = 0;
    for (long long d = 0; d <= m; d++) {
      res = 0;
      for (long long j = 0; j <= min(i, d); j++) {
        res =
            (C[m - d][i - j] * C[d][j] % mod * ((j & 1) ? mod - 1 : 1) + res) %
            mod;
      }
      ans = (res * c[d] + ans) % mod;
    }
    for (long long j = 1; j <= cou; j++) ans = ans * inv2 % mod;
    for (long long j = 1; j <= n - m + cou; j++) ans = ans * 2 % mod;
    cout << ans << " ";
  }
  return (0 - 0);
}
