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;
struct Z2Basis {
  long long int a[53];
  int sz;
  void add(long long int x) {
    for (int i = 0; i < 53; i++)
      if ((x >> i) & 1) {
        if ((a[i] >> i) & 1)
          x ^= a[i];
        else {
          a[i] = x;
          sz++;
          return;
        }
      }
  }
  void norm() {
    for (int i = 0; i < 53; i++)
      for (int j = 0; j < i; j++)
        if ((a[i] >> i) & 1)
          if ((a[j] >> i) & 1) a[j] ^= a[i];
  }
} Z2;
const int mod = 998244353;
int cnt[54];
vector<long long int> todo;
void dfs(int idx, long long int cur) {
  if (idx == todo.size()) {
    cnt[__builtin_popcountll(cur)]++;
    return;
  }
  dfs(idx + 1, cur);
  dfs(idx + 1, cur ^ todo[idx]);
}
long long int C[54][54];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  C[0][0] = 1;
  for (int i = 1; i <= 53; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
  }
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    Z2.add(x);
  }
  Z2.norm();
  if (Z2.sz <= 26) {
    for (int i = 0; i < 53; i++)
      if (Z2.a[i] != 0) todo.emplace_back(Z2.a[i]);
    dfs(0, 0);
    long long int c = 1;
    for (int i = Z2.sz; i < n; i++) c = c * 2 % mod;
    for (int i = 0; i <= m; i++) cout << c * cnt[i] % mod << ' ';
    cout << endl;
  } else {
    for (int i = 0; i < m; i++)
      if (Z2.a[i] == 0) {
        long long int cur = 1LL << i;
        for (int j = 0; j < m; j++)
          if ((Z2.a[j] >> i) & 1) cur ^= 1LL << j;
        todo.emplace_back(cur);
      }
    dfs(0, 0);
    long long int c = 1;
    for (int i = 0; i < m - Z2.sz; i++) c = c * ((mod + 1) / 2) % mod;
    for (int i = 0; i < n - Z2.sz; i++) c = c * 2 % mod;
    for (int i = 0; i <= m; i++) {
      long long int ans = 0;
      for (int j = 0; j <= m; j++) {
        long long int w = 0;
        for (int k = 0; k <= min(i, j); k++) {
          if (k & 1)
            w = (w - C[j][k] * C[m - j][i - k]) % mod;
          else
            w = (w + C[j][k] * C[m - j][i - k]) % mod;
        }
        w = (w % mod + mod) % mod;
        ans = (ans + w * cnt[j]) % mod;
      }
      cout << ans * c % mod << ' ';
    }
    cout << endl;
  }
}