#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
const long long MOD1 = 2286661337;
const long long MOD2 = 998244353;
const int INF = (int)1e9 + 7;
const double EPS = 1e-7;
const int N = (int)2e5;
const int M = 53;
int n, m, k;
long long a[N], b[M], in_basis[M], p[M + 1], q[M + 1], cnk[M + 1][M + 1],
    w[M + 1][M + 1], S[1 << 25];
int popcnt(long long x) {
  bitset<64> h(x);
  return h.count();
}
void solve1() {
  q[0] = 1;
  for (int i = 0; i < k; ++i) {
    for (int j = 0; j < 1 << i; ++j) {
      ++q[popcnt(S[j] ^ a[i])];
      if (i != k - 1) {
        S[(1 << i) + j] = S[j] ^ a[i];
      }
    }
  }
  for (int i = 0; i < m + 1; ++i) {
    p[i] = q[i];
  }
  long long pow_ = 1;
  for (int i = 0; i < n - k; ++i) {
    pow_ = pow_ * 2 % MOD2;
  }
  for (int i = 0; i < m + 1; ++i) {
    p[i] = p[i] * pow_ % MOD2;
  }
}
void make_cnk() {
  for (int n = 0; n < m + 1; ++n) {
    for (int k = 0; k < m + 1; ++k) {
      if (n == 0) {
        cnk[n][k] = (k == 0);
      } else {
        if (k == 0) {
          cnk[n][k] = 1;
        } else {
          cnk[n][k] = (cnk[n - 1][k] + cnk[n - 1][k - 1]) % MOD2;
        }
      }
    }
  }
}
void make_w() {
  for (int d = 0; d < m + 1; ++d) {
    for (int c = 0; c < m + 1; ++c) {
      for (int pow_ = 0; pow_ < c + 1; ++pow_) {
        long long cur = ((pow_ & 1) ? MOD2 - 1 : 1);
        cur = cur * cnk[d][pow_] % MOD2;
        cur = cur * cnk[m - d][c - pow_] % MOD2;
        w[c][d] = (w[c][d] + cur) % MOD2;
      }
    }
  }
}
long long bin_pow(long long x, long long p) {
  if (p == 0) {
    return 1;
  }
  long long res = bin_pow(x, p >> 1);
  res = res * res % MOD2;
  if (p & 1) {
    res = res * x % MOD2;
  }
  return res;
}
void solve2() {
  for (int i = 0; i < m - k; ++i) {
    int ind = 0;
    int ind_a = 0;
    for (int j = m - 1; j >= 0; --j) {
      if (!in_basis[j]) {
        if (ind == i) {
          ind_a = j;
          break;
        }
        ++ind;
      }
    }
    ind = 0;
    int ind_b = 0;
    for (int j = m - 1; j >= 0; --j) {
      if (in_basis[j]) {
        if (a[ind_b] >> ind_a & 1) {
          b[i] |= 1ll << j;
        }
        ++ind_b;
      } else {
        if (ind == i) {
          b[i] |= 1ll << j;
        }
        ++ind;
      }
    }
  }
  q[0] = 1;
  for (int i = 0; i < m - k; ++i) {
    for (int j = 0; j < 1 << i; ++j) {
      ++q[popcnt(S[j] ^ b[i])];
      if (i != m - k - 1) {
        S[(1 << i) + j] = S[j] ^ b[i];
      }
    }
  }
  make_cnk();
  make_w();
  long long pow_ = 1;
  for (int i = 0; i < m - k; ++i) {
    pow_ = pow_ * 2 % MOD2;
  }
  pow_ = bin_pow(pow_, MOD2 - 2);
  for (int i = 0; i < m + 1; ++i) {
    for (int d = 0; d < m + 1; ++d) {
      p[i] = (p[i] + w[i][d] * q[d]) % MOD2;
    }
    p[i] = p[i] * pow_ % MOD2;
  }
  pow_ = 1;
  for (int i = 0; i < n - k; ++i) {
    pow_ = pow_ * 2 % MOD2;
  }
  for (int i = 0; i < m + 1; ++i) {
    p[i] = p[i] * pow_ % MOD2;
  }
}
signed main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &a[i]);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = m - 1; j >= 0; --j) {
      if (a[i] >> j & 1) {
        if (in_basis[j]) {
          a[i] ^= in_basis[j];
        } else {
          in_basis[j] = a[i];
          break;
        }
      }
    }
  }
  for (int i = m - 1; i >= 0; --i) {
    if (in_basis[i]) {
      a[k] = in_basis[i];
      for (int j = 0; j < k; ++j) {
        if (a[j] >> i & 1) {
          a[j] ^= a[k];
        }
      }
      ++k;
    }
  }
  if (k <= m / 2) {
    solve1();
  } else {
    solve2();
  }
  for (int i = 0; i < m + 1; ++i) {
    printf("%lld ", p[i]);
  }
  return 0;
}
