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;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) {
    if (ch == '-') f = -1;
  }
  for (; isdigit(ch); ch = getchar()) {
    x = x * 10 + ch - 48;
  }
  return x * f;
}
const int mxN = 1 << 19;
const int mxM = 53;
const int P = 998244353;
long long comb[mxM + 3][mxM + 3];
int bitcnt[mxN + 3];
long long a[mxM + 3];
int b[mxM + 3];
long long ans[mxM + 3];
int n, m, sz;
long long quickpow(long long x, long long y) {
  long long cur = x, ret = 1ll;
  for (int i = 0; y; i++) {
    if (y & (1ll << i)) {
      y -= (1ll << i);
      ret = ret * cur % P;
    }
    cur = cur * cur % P;
  }
  return ret;
}
void initfact(int n) {
  comb[0][0] = 1ll;
  for (int i = 1; i <= n; i++) {
    comb[i][0] = comb[i][i] = 1ll;
    for (int j = 1; j < i; j++) {
      comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % P;
    }
  }
}
int getbitcnt(long long x) {
  return bitcnt[x & 524287] + bitcnt[(x >> 19) & 524287] +
         bitcnt[(x >> 38) & 524287];
}
namespace Solve1 {
void dfs(int pos, long long x) {
  if (pos == sz) {
    ans[getbitcnt(x)]++;
    return;
  }
  dfs(pos + 1, x);
  dfs(pos + 1, x ^ a[b[pos]]);
}
}  // namespace Solve1
namespace Solve2 {
long long sta[mxM + 3];
long long f[mxM + 3];
void dfs(int pos, int cnt, long long x) {
  if (pos == m) {
    f[cnt + getbitcnt(x)]++;
    return;
  }
  dfs(pos + 1, cnt, x);
  dfs(pos + 1, cnt + 1, x ^ sta[pos]);
}
void solve() {
  for (int i = sz; i < m; i++) {
    for (int j = 0; j < sz; j++) {
      if (a[b[j]] & (1ll << b[i])) {
        sta[i] |= (1ll << j);
      }
    }
  }
  dfs(sz, 0, 0ll);
  for (int k = 0; k <= m; k++) {
    for (int i = 0; i <= m; i++) {
      long long coe = 0ll;
      for (int j = 0; j <= i && j <= k; j++) {
        long long tmp = comb[i][j] * comb[m - i][k - j] % P;
        if (j & 1) tmp = P - tmp;
        coe += tmp - P, coe += (coe >> 31) & P;
      }
      coe = coe * f[i] % P;
      ans[k] += coe - P, ans[k] += (ans[k] >> 31) & P;
    }
    ans[k] = ans[k] * quickpow((P + 1ll) / 2ll, m - sz) % P;
  }
}
}  // namespace Solve2
int main() {
  initfact(mxM);
  for (int i = 1; i < mxN; i++) bitcnt[i] = bitcnt[i >> 1] + (i & 1);
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    long long x;
    scanf("%I64d", &x);
    for (int k = m - 1; k >= 0; k--)
      if (x & (1ll << k)) {
        if (!a[k]) {
          a[k] = x;
          sz++;
          break;
        } else
          x ^= a[k];
      }
  }
  for (int i = m - 1; i >= 0; i--)
    if (a[i]) {
      for (int j = i + 1; j < m; j++)
        if (a[j] & (1ll << i)) a[j] ^= a[i];
    }
  for (int i = 0, j = 0; i < sz; i++) {
    while (!a[j]) j++;
    b[i] = j;
    j++;
  }
  for (int i = sz, j = 0; i < m; i++) {
    while (a[j]) j++;
    b[i] = j;
    j++;
  }
  if (sz <= 26)
    Solve1::dfs(0, 0ll);
  else
    Solve2::solve();
  for (int i = 0; i <= m; i++) ans[i] = ans[i] * quickpow(2ll, n - sz) % P;
  for (int i = 0; i <= m; i++) printf("%I64d ", ans[i]);
  puts("");
  return 0;
}