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;
using i64 = long long;
const int maxN = 223456;
const int P = 998244353;
int n, m, rnk;
i64 base[maxN], p[maxN], dp[60][60][2];
int cnt[maxN], ans[maxN];
void dfs1(int d, i64 x) {
  if (d == rnk) {
    cnt[__builtin_popcountll(x)]++;
  } else {
    dfs1(d + 1, x);
    dfs1(d + 1, x ^ p[d]);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    i64 x;
    scanf("%lld", &x);
    for (int j = m - 1; j >= 0; j--) {
      if (base[j]) {
        x = min(x, base[j] ^ x);
      } else if (x & (1ll << j)) {
        base[j] = x;
        p[rnk++] = x;
        break;
      }
    }
  }
  if (rnk <= m / 2) {
    dfs1(0, 0);
    i64 multi = 1;
    for (int i = 0; i < n - rnk; i++) multi = multi * 2 % P;
    for (int i = 0; i <= m; i++) {
      printf("%lld ", cnt[i] * multi % P);
    }
  } else {
    for (int i = m - 1; i >= 0; i--) {
      for (int j = i - 1; j >= 0; j--)
        base[i] = min(base[i], base[i] ^ base[j]);
    }
    rnk = 0;
    for (int i = 0; i < m; i++)
      if (base[i] == 0) {
        i64 x = (1ll << i);
        for (int j = i + 1; j < m; j++)
          if (base[j] & (1ll << i)) {
            x ^= (1ll << j);
          }
        p[rnk++] = x;
      }
    dfs1(0, 0);
    for (int x = 0; x <= m; x++) {
      memset(dp, 0, sizeof(dp));
      dp[0][0][0] = 1;
      for (int j = 0; j < m; j++)
        for (int k = 0; k <= m; k++)
          for (int par = 0; par <= 1; par++) {
            dp[j + 1][k + 1][par ^ (j < x)] += dp[j][k][par];
            dp[j + 1][k][par] += dp[j][k][par];
          }
      for (int k = 0; k <= m; k++) {
        i64 w = dp[m][k][0] - dp[m][k][1];
        w %= P;
        if (w < 0) w += P;
        ans[k] = (ans[k] + cnt[x] * w) % P;
      }
    }
    i64 multi = 1;
    for (int i = 0; i < n; i++) multi = multi * 2 % P;
    for (int i = 0; i < m; i++) multi = multi * (P + 1) / 2 % P;
    for (int i = 0; i <= m; i++) {
      printf("%lld ", ans[i] * multi % P);
    }
  }
}