#include <bits/stdc++.h>
using namespace std;
long long base[60];
long long f[200000][60];
long long ans[100];
long long q1[10000], q2[10000];
int n, half;
long long mypow(long long x, long long y) {
  long long ret = 1;
  while (y) {
    if (y & 1) ret = ret * x % 998244353;
    x = x * x % 998244353;
    y >>= 1;
  }
  return ret;
}
void fwt() {
  for (int w = 2; w <= (1 << half); w <<= 1)
    for (int k = 0; k < (1 << half); k += w)
      for (int j = k; j < k + (w >> 1); j++)
        for (int l = n; l; l--) {
          (f[j][l] += f[j + (w >> 1)][l - 1]) %= 998244353;
          (f[j + (w >> 1)][l] += f[j][l - 1]) %= 998244353;
        }
}
int main() {
  int tot;
  cin >> tot >> n;
  if (n == 0) {
    cout << mypow(2, tot) << endl;
    return 0;
  }
  for (int i = 1; i <= tot; i++) {
    long long x;
    scanf("%lld", &x);
    for (int i = n - 1; ~i; i--)
      if ((x >> i) & 1) {
        if (!base[i]) {
          base[i] = x;
          break;
        }
        x ^= base[i];
      }
  }
  half = n >> 1;
  if (half == 0) half++;
  int cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < n; i++)
    if (base[i]) {
      if (i >= half)
        q1[++cnt1] = base[i];
      else
        q2[++cnt2] = base[i];
    }
  int full1 = (1 << cnt1) - 1, full2 = (1 << cnt2) - 1;
  for (int i = 0; i <= full1; i++) {
    long long now = 0;
    for (int j = 1; j <= cnt1; j++)
      if (i & (1 << (j - 1))) now ^= q1[j];
    f[now & ((1ll << half) - 1)][__builtin_popcountll(now >> half)]++;
  }
  fwt();
  for (int i = 0; i <= full2; i++) {
    long long now = 0;
    for (int j = 1; j <= cnt2; j++)
      if (i & (1 << (j - 1))) now ^= q2[j];
    for (int j = 0; j <= n; j++) (ans[j] += f[now][j]) %= 998244353;
  }
  for (int i = 0; i < n; i++)
    if (base[i]) tot--;
  for (int i = 0; i <= n; i++)
    printf("%lld ", ans[i] * mypow(2, tot) % 998244353);
  puts("");
  return 0;
}
