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 namespace std;
template <class T>
inline void cmin(T &a, const T &b) {
  ((a > b) && (a = b));
}
template <class T>
inline void cmax(T &a, const T &b) {
  ((a < b) && (a = b));
}
char IO;
template <class T = int>
T rd() {
  T s = 0;
  int f = 0;
  while (!isdigit(IO = getchar()))
    if (IO == '-') f = 1;
  do s = (s << 1) + (s << 3) + (IO ^ '0');
  while (isdigit(IO = getchar()));
  return f ? -s : s;
}
const int N = 2e5 + 10, K = 19, P = 998244353;
int n, m, k;
long long qpow(long long x, long long k = P - 2) {
  long long res = 1;
  for (; k; k >>= 1, x = x * x % P)
    if (k & 1) res = res * x % P;
  return res;
}
long long d[60], e[60], dp[60], w[60][60], C[60][60];
namespace Enum {
long long d[60], c;
long long s[1 << 14], t[1 << 14];
void Solve(long long *D) {
  for (int i = 0, iend = m - 1; i <= iend; ++i)
    if (D[i]) d[c++] = D[i];
  int m = c / 2;
  for (int i = 0, iend = (1 << m) - 1; i <= iend; ++i)
    for (int j = 0, jend = m - 1; j <= jend; ++j)
      if (i & (1 << j)) s[i] ^= d[j];
  for (int i = 0, iend = (1 << (c - m)) - 1; i <= iend; ++i)
    for (int j = m, jend = c - 1; j <= jend; ++j)
      if (i & (1 << (j - m))) t[i] ^= d[j];
  int A = (1 << m) - 1;
  for (int i = 0, iend = (1 << c) - 1; i <= iend; ++i)
    dp[__builtin_popcountll(s[i & A] ^ t[i >> m])]++;
}
}  // namespace Enum
int key[60], nonkey[60], c;
int main() {
  for (int i = 0, iend = 56; i <= iend; ++i)
    for (int j = C[i][0] = 1, jend = i; j <= jend; ++j)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % P;
  n = rd(), m = rd();
  for (int t = 1, tend = n; t <= tend; ++t) {
    long long x = rd<long long>();
    for (int i = m - 1, iend = 0; i >= iend; --i)
      if (x & (1ll << i)) {
        if (!d[i]) {
          d[i] = x;
          n--, k++;
          break;
        } else
          x ^= d[i];
      }
  }
  memset(key, -1, sizeof key);
  for (int i = m - 1, iend = 0; i >= iend; --i)
    if (d[i]) {
      for (int j = i - 1, jend = 0; j >= jend; --j)
        if (d[i] & (1ll << j)) d[i] ^= d[j];
    }
  c = k = 0;
  for (int i = 0, iend = m - 1; i <= iend; ++i)
    if (d[i]) {
      k++;
      e[m - k] |= 1ll << (m - k);
      for (int j = 0, jend = i - 1; j <= jend; ++j)
        if (d[i] & (1ll << j)) {
          if (key[j] == -1) key[j] = c++;
          e[m - k] |= 1ll << key[j];
        }
    }
  memset(d, 0, sizeof d), swap(d, e);
  n = qpow(2, n);
  if (k <= 26) {
    Enum::Solve(d);
    for (int i = 0, iend = m; i <= iend; ++i) printf("%d ", dp[i] * n % P);
    return 0;
  }
  for (int i = m - 1, iend = 0; i >= iend; --i) {
    if (!d[i]) e[i] |= 1ll << i;
    for (int j = i - 1, jend = 0; j >= jend; --j)
      if (d[i] & (1ll << j)) e[j] |= 1ll << i;
  }
  Enum::Solve(e);
  for (int i = 0, iend = m; i <= iend; ++i)
    for (int j = 0, jend = m; j <= jend; ++j) {
      for (int k = 0, kend = min(i, j); k <= kend; ++k)
        w[i][j] = (w[i][j] + C[j][k] * C[m - j][i - k] * (k & 1 ? -1 : 1)) % P;
      ((w[i][j] < 0) && (w[i][j] += P));
    }
  n = n * qpow((P + 1) / 2, m - k) % P;
  for (int i = 0, iend = m; i <= iend; ++i) {
    long long ans = 0;
    for (int j = 0, jend = m; j <= jend; ++j) ans = (ans + dp[j] * w[i][j]) % P;
    printf("%lld ", ans * n % P);
  }
}