#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5, MAXM = 55, Mod = 998244353;
char buf[1 << 12], *pp1 = buf, *pp2 = buf, nc;
int ny;
inline char gc() {
  return pp1 == pp2 &&
                 (pp2 = (pp1 = buf) + fread(buf, 1, 1 << 12, stdin), pp1 == pp2)
             ? EOF
             : *pp1++;
}
inline long long read() {
  long long x = 0;
  for (ny = 1; nc = gc(), (nc < 48 || nc > 57) && nc != EOF;)
    if (nc == 45) ny = -1;
  if (nc < 0) return nc;
  for (x = nc - 48; nc = gc(), 47 < nc && nc < 58 && nc != EOF;
       x = (x << 3) + (x << 1) + (nc ^ 48))
    ;
  return x * ny;
}
int n, m, cnt, ans[MAXN], C[MAXM][MAXM], w[MAXM][MAXM], Fpow[MAXN], t[MAXN];
long long a[MAXN], b[MAXM], c[MAXN], p[MAXN];
inline void insert(long long x) {
  for (int i = (m); i >= (0); i--)
    if (x >> i & 1) {
      if (!b[i]) {
        b[i] = x;
        break;
      }
      x ^= b[i];
    }
}
void dfs(int x, long long val) {
  if (x == cnt + 1) {
    ans[__builtin_popcountll(val)]++;
    return;
  }
  dfs(x + 1, val), dfs(x + 1, val ^ p[x]);
}
int main() {
  n = read(), m = read() - 1, Fpow[0] = 1;
  for (int i = (1); i <= (n); i++) Fpow[i] = Fpow[i - 1] * 2 % Mod;
  for (int i = (1); i <= (n); i++) a[i] = read(), insert(a[i]);
  for (int i = (0); i <= (m); i++)
    for (int j = (i - 1); j >= (0); j--)
      if (b[i] >> j & 1) b[i] ^= b[j];
  for (int i = (0); i <= (m); i++)
    if (b[i]) cnt++;
  if (cnt <= 27) {
    cnt = 0;
    for (int i = (0); i <= (m); i++)
      if (b[i]) p[++cnt] = b[i];
    dfs(1, 0);
    for (int i = (0); i <= (m + 1); i++)
      cout << 1ll * ans[i] * Fpow[n - cnt] % Mod << " ";
    cout << "\n";
  } else {
    cnt = 0;
    for (int i = (0); i <= (m); i++)
      for (int j = (0); j <= (m); j++) c[j] |= (b[i] >> j & 1) << i;
    for (int i = (0); i <= (m); i++)
      if (c[i] ^= 1ll << i) p[++cnt] = c[i];
    ++m, dfs(1, 0);
    for (int i = (0); i <= (m); i++) {
      C[i][0] = 1;
      for (int j = (1); j <= (i); j++)
        C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % Mod;
    }
    for (int i = (0); i <= (m); i++)
      for (int j = (0); j <= (m); j++)
        for (int k = (0); k <= (i); k++)
          w[i][j] = (w[i][j] + 1ll * (k & 1 ? Mod - 1 : 1) * C[j][k] % Mod *
                                   C[m - j][i - k] % Mod) %
                    Mod;
    int tag = Fpow[max(0, n - m + cnt)];
    for (int i = (1); i <= (cnt); i++) tag = 1ll * (Mod + 1 >> 1) * tag % Mod;
    for (int i = (0); i <= (m); i++)
      for (int j = (0); j <= (m); j++)
        t[i] = (t[i] + 1ll * ans[j] * w[i][j]) % Mod;
    for (int i = (0); i <= (m); i++) cout << 1ll * t[i] * tag % Mod << " ";
    cout << '\n';
  }
  return 0;
}
