#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) {
    if (ch == '-') f = -1;
  }
  for (; isdigit(ch); ch = getchar()) {
    x = x * 10 + ch - 48;
  }
  return x * f;
}
const int mxN = 1 << 19;
const int mxM = 53;
const int P = 998244353;
long long comb[mxM + 3][mxM + 3];
int bitcnt[mxN + 3];
long long a[mxM + 3];
int b[mxM + 3];
long long ans[mxM + 3];
int n, m, sz;
long long quickpow(long long x, long long y) {
  long long cur = x, ret = 1ll;
  for (int i = 0; y; i++) {
    if (y & (1ll << i)) {
      y -= (1ll << i);
      ret = ret * cur % P;
    }
    cur = cur * cur % P;
  }
  return ret;
}
void initfact(int n) {
  comb[0][0] = 1ll;
  for (int i = 1; i <= n; i++) {
    comb[i][0] = comb[i][i] = 1ll;
    for (int j = 1; j < i; j++) {
      comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % P;
    }
  }
}
int getbitcnt(long long x) {
  return bitcnt[x & 524287] + bitcnt[(x >> 19) & 524287] +
         bitcnt[(x >> 38) & 524287];
}
namespace Solve1 {
void dfs(int pos, long long x) {
  if (pos == sz) {
    ans[getbitcnt(x)]++;
    return;
  }
  dfs(pos + 1, x);
  dfs(pos + 1, x ^ a[b[pos]]);
}
}  // namespace Solve1
namespace Solve2 {
long long sta[mxM + 3];
long long f[mxM + 3];
void dfs(int pos, int cnt, long long x) {
  if (pos == m) {
    f[cnt + getbitcnt(x)]++;
    return;
  }
  dfs(pos + 1, cnt, x);
  dfs(pos + 1, cnt + 1, x ^ sta[pos]);
}
void solve() {
  for (int i = sz; i < m; i++) {
    for (int j = 0; j < sz; j++) {
      if (a[b[j]] & (1ll << b[i])) {
        sta[i] |= (1ll << j);
      }
    }
  }
  dfs(sz, 0, 0ll);
  for (int k = 0; k <= m; k++) {
    for (int i = 0; i <= m; i++) {
      long long coe = 0ll;
      for (int j = 0; j <= i && j <= k; j++) {
        long long tmp = comb[i][j] * comb[m - i][k - j] % P;
        if (j & 1) {
          tmp = P - tmp;
        }
        coe += tmp - P, coe += (coe >> 31) & P;
      }
      coe = coe * f[i] % P;
      ans[k] += coe - P, ans[k] += (ans[k] >> 31) & P;
    }
    ans[k] = ans[k] * quickpow((P + 1ll) / 2ll, m - sz) % P;
  }
}
}  // namespace Solve2
int main() {
  initfact(mxM);
  for (int i = 1; i < mxN; i++) bitcnt[i] = bitcnt[i >> 1] + (i & 1);
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    long long x;
    scanf("%I64d", &x);
    for (int k = m - 1; k >= 0; k--)
      if (x & (1ll << k)) {
        if (!a[k]) {
          a[k] = x;
          sz++;
          break;
        } else {
          x ^= a[k];
        }
      }
  }
  for (int i = m - 1; i >= 0; i--)
    if (a[i]) {
      for (int j = i + 1; j < m; j++)
        if (a[j] & (1ll << i)) {
          a[j] ^= a[i];
        }
    }
  for (int i = 0, j = 0; i < sz; i++) {
    while (!a[j]) {
      j++;
    }
    b[i] = j;
    j++;
  }
  for (int i = sz, j = 0; i < m; i++) {
    while (a[j]) {
      j++;
    }
    b[i] = j;
    j++;
  }
  if (sz <= 26) {
    Solve1::dfs(0, 0ll);
  } else {
    Solve2::solve();
  }
  for (int i = 0; i <= m; i++) ans[i] = ans[i] * quickpow(2ll, n - sz) % P;
  for (int i = 0; i <= m; i++) printf("%I64d ", ans[i]);
  puts("");
  return 0;
}
