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;
const long long N = 57;
const long long M = 262144;
const long long INF = 1e9 + 7;
const long long mod = 998244353;
long long Pow(long long x, long long y) {
  long long ans = 1, now = x;
  while (y) {
    if (y & 1) ans = ans * now % mod;
    now = now * now % mod;
    y >>= 1;
  }
  return ans;
}
long long n, m, ss = 0, st = 0;
long long t[N], a[N], bc[M], u[N], b[N], g[N], p[N][N], f[N], h[N][N], fac[N],
    inv[N];
long long Bc(long long x) { return bc[x / M / M] + bc[x / M % M] + bc[x % M]; }
long long C(long long x, long long y) {
  if (x < y || y < 0) return 0;
  return fac[x] * inv[y] % mod * inv[x - y] % mod;
}
void dfs1(long long x, long long v) {
  if (x == ss + 1) {
    u[Bc(v)]++;
    return;
  }
  dfs1(x + 1, v);
  dfs1(x + 1, v ^ t[a[x]]);
}
void dfs2(long long x, long long v, long long s) {
  if (x == st + 1) {
    p[s][Bc(v)]++;
    return;
  }
  dfs2(x + 1, v, s);
  dfs2(x + 1, v ^ g[x], s + 1);
}
int main() {
  scanf("%lld%lld", &n, &m);
  for (long long i = 1; i <= n; i++) {
    long long x;
    scanf("%lld", &x);
    for (long long j = m - 1; ~j; j--) {
      if ((x >> j) & 1ll) {
        if (!t[j]) {
          t[j] = x;
          break;
        }
        x ^= t[j];
      }
    }
  }
  for (long long i = 0; i <= M - 1; i++) {
    long long nw = i;
    bc[i] = 0;
    while (nw) {
      bc[i] += (nw & 1);
      nw >>= 1;
    }
  }
  for (long long i = 0; i <= m - 1; i++)
    if (t[i])
      a[++ss] = i;
    else
      b[++st] = i;
  long long pw = 1;
  for (long long i = 1; i <= n - ss; i++) pw = (pw + pw) % mod;
  if (ss <= (m + 1) / 2) {
    dfs1(1, 0);
    for (long long i = 0; i <= m + 1 - 1; i++) printf("%lld ", u[i] * pw % mod);
  } else {
    fac[0] = 1;
    for (long long i = 1; i <= st; i++) fac[i] = fac[i - 1] * i % mod;
    inv[st] = Pow(fac[st], mod - 2);
    for (long long i = st; i; i--) inv[i - 1] = inv[i] * i % mod;
    for (long long i = 0; i <= st + 1 - 1; i++) {
      for (long long j = 0; j <= st + 1 - 1; j++) {
        h[i][j] = 0;
        for (long long k = 0; k <= i + 1 - 1; k++) {
          if (k & 1)
            h[i][j] = (h[i][j] - C(i, k) * C(st - i, j - k) % mod + mod) % mod;
          else
            h[i][j] = (h[i][j] + C(i, k) * C(st - i, j - k)) % mod;
        }
      }
    }
    for (long long i = 0; i <= m - 1; i++)
      if (t[i])
        for (long long j = i + 1; j <= m - 1; j++)
          if ((t[j] >> i) & 1) t[j] ^= t[i];
    for (long long i = 1; i <= st; i++) {
      g[i] = 0;
      for (long long j = 1; j <= ss; j++)
        g[i] = (g[i] << 1) | ((t[a[j]] >> b[i]) & 1);
    }
    dfs2(1, 0, 0);
    for (long long j = 0; j <= ss + 1 - 1; j++) {
      for (long long i = 0; i <= ss + 1 - 1; i++) f[i] = 0;
      f[0] = 1;
      for (long long i = 1; i <= ss - j; i++)
        for (long long k = ss; k; k--) f[k] = (f[k] + f[k - 1]) % mod;
      for (long long i = 1; i <= j; i++)
        for (long long k = ss; k; k--) f[k] = (f[k] - f[k - 1] + mod) % mod;
      for (long long i = 0; i <= ss + 1 - 1; i++)
        for (long long k = 0; k <= st + 1 - 1; k++)
          for (long long o = 0; o <= st + 1 - 1; o++)
            u[i + o] = (u[i + o] + p[k][j] * h[k][o] % mod * f[i]) % mod;
    }
    long long iv = Pow(Pow(2, st), mod - 2);
    for (long long i = 0; i <= m + 1 - 1; i++)
      printf("%lld ", u[i] * iv % mod * pw % mod);
    puts("");
  }
  return 0;
}