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 <typename T>
bool chkmin(T &x, T y) {
  return x > y ? x = y, 1 : 0;
}
template <typename T>
bool chkmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
long long readint() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int cys = 998244353;
int n, m, k;
long long a[60], f[60], C[60][60], d[60][60], p[60];
long long mod(long long x) { return x >= cys ? x - cys : x; }
void dfs(int u, int t, long long x) {
  if (u == t)
    p[__builtin_popcountll(x)]++;
  else
    dfs(u + 1, t, x), dfs(u + 1, t, x ^ f[u]);
}
void insert(long long x) {
  for (int i = m - 1; i >= 0; i--) {
    if (x & (1ll << i)) {
      if (a[i])
        x ^= a[i];
      else {
        a[i] = x;
        return;
      }
    }
  }
}
int main() {
  n = readint();
  m = readint();
  for (int i = 1; i <= n; i++) insert(readint());
  for (int i = 0; i < m; i++)
    if (a[i])
      for (int j = i + 1; j < m; j++)
        if ((a[j] >> i) & 1) a[j] ^= a[i];
  for (int i = 0; i < m; i++) {
    if (a[i]) {
      if (i != k) {
        for (int j = 0; j < m; j++) {
          if (!a[j]) continue;
          int ti = (a[j] >> i) & 1, tk = (a[j] >> k) & 1;
          if (ti) a[j] ^= 1ll << i;
          if (tk) a[j] ^= 1ll << k;
          if (ti) a[j] ^= 1ll << k;
          if (tk) a[j] ^= 1ll << i;
        }
      }
      k++;
    }
  }
  k = 0;
  for (int i = 0; i < m; i++)
    if (a[i]) f[k++] = a[i];
  for (int i = k; i < m; i++) f[i] = 1ll << i;
  for (int i = k; i < m; i++)
    for (int j = 0; j < k; j++)
      if ((f[j] >> i) & 1) f[i] ^= 1ll << j;
  if (k <= 27) {
    dfs(0, k, 0);
    long long ans = 1;
    for (int i = 0; i < n - k; i++) ans = ans * 2 % cys;
    for (int i = 0; i <= m; i++) printf("%lld ", ans * p[i] % cys);
    printf("\n");
  } else {
    dfs(k, m, 0);
    for (int i = 0; i <= m; i++) C[i][0] = 1;
    for (int i = 1; i <= m; i++)
      for (int j = 1; j <= i; j++) C[i][j] = mod(C[i - 1][j] + C[i - 1][j - 1]);
    for (int i = 0; i <= m; i++) {
      for (int j = 0; j <= m; j++) {
        for (int l = 0; l <= i; l++) {
          long long tmp = C[j][l] * C[m - j][i - l] % cys;
          if (l & 1)
            d[i][j] = mod(d[i][j] + cys - tmp);
          else
            d[i][j] = mod(d[i][j] + tmp);
        }
      }
    }
    for (int i = 0; i <= m; i++) {
      long long ans = 0;
      for (int j = 0; j <= m; j++) ans = (ans + p[j] * d[i][j]) % cys;
      for (int j = 0; j < m - k; j++) ans = ans * ((cys + 1) / 2) % cys;
      for (int j = 0; j < n - k; j++) ans = ans * 2 % cys;
      printf("%lld ", ans);
    }
    printf("\n");
  }
  return 0;
}