Problem: This is the hard version of the problem. The only difference between easy and hard versions is the constraint of m. You can make hacks only if both versions are solved.

Chiori loves dolls and now she is going to decorate her bedroom!

<image>

As a doll collector, Chiori has got n dolls. The i-th doll has a non-negative integer value a_i (a_i < 2^m, m is given). Chiori wants to pick some (maybe zero) dolls for the decoration, so there are 2^n different picking ways.

Let x be the bitwise-xor-sum of values of dolls Chiori picks (in case Chiori picks no dolls x = 0). The value of this picking way is equal to the number of 1-bits in the binary representation of x. More formally, it is also equal to the number of indices 0 ≤ i < m, such that \left⌊ (x)/(2^i) \right⌋ is odd.

Tell her the number of picking ways with value i for each integer i from 0 to m. Due to the answers can be very huge, print them by modulo 998 244 353.

Input

The first line contains two integers n and m (1 ≤ n ≤ 2 ⋅ 10^5, 0 ≤ m ≤ 53) — the number of dolls and the maximum value of the picking way.

The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_i < 2^m) — the values of dolls.

Output

Print m+1 integers p_0, p_1, …, p_m — p_i is equal to the number of picking ways with value i by modulo 998 244 353.

Examples

Input


4 4
3 5 8 14


Output


2 2 6 6 0 

Input


6 7
11 45 14 9 19 81


Output


1 2 11 20 15 10 5 0 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using std::max;
using std::min;
const int inf = 0x3f3f3f3f, Inf = 0x7fffffff;
const long long INF = 0x3f3f3f3f3f3f3f3f;
std::mt19937 rnd(std::chrono::steady_clock::now().time_since_epoch().count());
template <typename _Tp>
_Tp gcd(const _Tp &a, const _Tp &b) {
  return !b ? a : gcd(b, a % b);
}
template <typename _Tp>
inline _Tp abs(const _Tp &a) {
  return a >= 0 ? a : -a;
}
template <typename _Tp>
inline void chmax(_Tp &a, const _Tp &b) {
  a = a < b ? b : a;
}
template <typename _Tp>
inline void chmin(_Tp &a, const _Tp &b) {
  a = a < b ? a : b;
}
template <typename _Tp>
inline void read(_Tp &x) {
  char ch(getchar());
  bool f(false);
  while (!isdigit(ch)) f |= ch == 45, ch = getchar();
  x = ch & 15, ch = getchar();
  while (isdigit(ch)) x = (((x << 2) + x) << 1) + (ch & 15), ch = getchar();
  f && (x = -x);
}
template <typename _Tp, typename... Args>
void read(_Tp &t, Args &...args) {
  read(t);
  read(args...);
}
inline int read_str(char *s) {
  char ch(getchar());
  while (ch == ' ' || ch == '\r' || ch == '\n') ch = getchar();
  char *tar = s;
  *tar++ = ch, ch = getchar();
  while (ch != ' ' && ch != '\r' && ch != '\n' && ch != EOF)
    *tar++ = ch, ch = getchar();
  return *tar = 0, tar - s;
}
const int N = 200005;
const int mod = 998244353;
long long ksm(long long a, long long b = mod - 2) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod, b >>= 1;
  }
  return res;
}
template <typename _Tp1, typename _Tp2>
inline void add(_Tp1 &a, _Tp2 b) {
  (a += b) >= mod && (a -= mod);
}
template <typename _Tp1, typename _Tp2>
inline void sub(_Tp1 &a, _Tp2 b) {
  (a -= b) < 0 && (a += mod);
}
long long d[55], a[55], S, val[55];
int cnt[1 << 14], SIZ, ans[55], res[55], C[55][55];
inline int popc(long long x) {
  return cnt[x & 0x3fff] + cnt[(x >> 14) & 0x3fff] + cnt[(x >> 28) & 0x3fff] +
         cnt[(x >> 42) & 0x3fff];
}
void dfs(int dep, long long s) {
  if (dep == SIZ) return ++ans[popc(s)], void();
  dfs(dep + 1, s), dfs(dep + 1, s ^ a[dep]);
}
void DFS(int dep, long long s, int c) {
  if (dep == SIZ) return ++res[popc(s) + c], void();
  DFS(dep + 1, s, c), DFS(dep + 1, s ^ val[dep], c + 1);
}
int main() {
  for (int i = 0; i < 55; ++i)
    for (int j = C[i][0] = 1; j <= i; ++j)
      C[i][j] = C[i - 1][j - 1], add(C[i][j], C[i - 1][j]);
  for (int i = 0; i < 1 << 14; ++i) cnt[i] = cnt[i >> 1] + (i & 1);
  int n, m;
  read(n, m);
  long long x;
  for (int i = 1; i <= n; ++i) {
    read(x);
    for (int j = m - 1; j >= 0; --j)
      if (x >> j & 1) {
        if (d[j])
          x ^= d[j];
        else {
          d[j] = x;
          break;
        }
      }
  }
  for (int i = m - 1; i >= 0; --i)
    if (d[i])
      for (int j = i + 1; j < m; ++j)
        if (d[j] >> i & 1) d[j] ^= d[i];
  std::vector<long long> v;
  for (int i = 0; i < m; ++i)
    if (d[i]) v.push_back(d[i]);
  long long mul = ksm(2, n - ((int)v.size()));
  if (((int)v.size()) <= m - ((int)v.size())) {
    for (int i = 0; i < ((int)v.size()); ++i) a[i] = v[i];
    SIZ = ((int)v.size()), dfs(0, 0);
    for (int i = 0; i <= m; ++i)
      printf("%lld%c", mul * ans[i] % mod, " \n"[i == m]);
    return 0;
  }
  SIZ = 0;
  for (int i = 0; i < m; ++i)
    if (!d[i]) {
      for (int j = 0; j < ((int)v.size()); ++j)
        if (v[j] >> i & 1) val[SIZ] |= 1LL << j;
      ++SIZ;
    }
  DFS(0, 0, 0);
  for (int a = 0; a <= m; ++a)
    for (int b = 0; b <= m; ++b) {
      int coef = 0;
      for (int i = 0; i <= a && i <= b; ++i) {
        int tmp = 1LL * C[a][i] * C[m - a][b - i] % mod;
        i & 1 ? sub(coef, tmp) : add(coef, tmp);
      }
      add(ans[b], 1LL * res[a] * coef % mod);
    }
  mul = mul * ksm((mod + 1) / 2, m - ((int)v.size())) % mod;
  for (int i = 0; i <= m; ++i)
    printf("%lld%c", mul * ans[i] % mod, " \n"[i == m]);
  return 0;
}