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>
template <class T>
inline void read(T &x) {
  x = 0;
  register char c = getchar();
  register bool f = 0;
  while (!isdigit(c)) f ^= c == '-', c = getchar();
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  if (f) x = -x;
}
const int N = 60, mod = 998244353;
int n, m, k, t, c[N];
long long f[N], g[N];
struct z {
  int x;
  z(int x = 0) : x(x) {}
  friend inline z operator*(z a, z b) { return (long long)a.x * b.x % mod; }
  friend inline z operator-(z a, z b) {
    return (a.x -= b.x) < 0 ? a.x + mod : a.x;
  }
  friend inline z operator+(z a, z b) {
    return (a.x += b.x) >= mod ? a.x - mod : a.x;
  }
} p[N], q[N], fac[N], ifac[N];
inline z C(int n, int m) { return n < m ? 0 : fac[n] * ifac[m] * ifac[n - m]; }
inline z fpow(z a, int b) {
  z s = 1;
  for (; b; b >>= 1, a = a * a)
    if (b & 1) s = s * a;
  return s;
}
inline void insert(long long x) {
  for (int i = m - 1; i >= 0; i--)
    if ((x >> i) & 1) {
      if (f[i])
        x ^= f[i];
      else {
        f[i] = x;
        return;
      }
    }
}
int main() {
  read(n), read(m);
  for (int i = 1; i <= n; i++) {
    long long x;
    read(x), insert(x);
  }
  for (int i = 0; i < m; i++)
    for (int j = i + 1; j < m; j++)
      if ((f[j] >> i) & 1) f[j] ^= f[i];
  for (int i = 0; i < m; i++)
    if (f[i]) c[i] = k++;
  for (int i = 0; i < m; i++)
    if (!f[i]) c[i] = k + (t++);
  for (int i = 0; i < m; i++)
    if (f[i])
      for (int j = 0; j < m; j++)
        if ((f[i] >> j) & 1) g[c[i]] |= 1ll << c[j];
  for (int i = 0; i < k; i++)
    for (int j = k; j < m; j++)
      if ((g[i] >> j) & 1) g[j] |= 1ll << i;
  for (int i = k; i < m; i++) g[i] |= 1ll << i;
  if (k <= ((m + 1) >> 1)) {
    std::function<void(int, long long)> dfs = [&](int i, long long s) {
      if (i >= k) {
        p[__builtin_popcountll(s)].x++;
        return;
      }
      dfs(i + 1, s), dfs(i + 1, s ^ g[i]);
    };
    dfs(0, 0ll);
  } else {
    std::function<void(int, long long)> dfs = [&](int i, long long s) {
      if (i >= m) {
        q[__builtin_popcountll(s)].x++;
        return;
      }
      dfs(i + 1, s), dfs(i + 1, s ^ g[i]);
    };
    dfs(k, 0ll);
    fac[0] = ifac[0] = ifac[1] = 1;
    for (int i = 1; i <= m; i++) fac[i] = fac[i - 1] * i;
    for (int i = 2; i <= m; i++) ifac[i] = (mod - mod / i) * ifac[mod % i];
    for (int i = 1; i <= m; i++) ifac[i] = ifac[i - 1] * ifac[i];
    for (int c = 0; c <= m; c++)
      for (int d = 0; d <= m; d++)
        for (int i = 0; i <= c; i++) {
          p[c] = p[c] + fpow(2, mod - 1 + k - m) * q[d] *
                            (i & 1 ? mod - 1 : 1) * C(d, i) * C(m - d, c - i);
        }
  }
  for (int i = 0; i <= m; i++)
    printf("%d%c", (p[i] * fpow(2, n - k)).x, " \n"[i == m]);
}