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 MOD = (long long)1e9 + 7;
const long long MOD1 = 2286661337;
const long long MOD2 = 998244353;
const int INF = (int)1e9 + 7;
const double EPS = 1e-7;
const int N = (int)2e5;
const int M = 53;
int n, m, k;
long long a[N], b[M], in_basis[M], p[M + 1], q[M + 1], cnk[M + 1][M + 1],
    w[M + 1][M + 1], S[1 << 25];
int popcnt(long long x) {
  bitset<64> h(x);
  return h.count();
}
void solve1() {
  q[0] = 1;
  for (int i = 0; i < k; ++i) {
    for (int j = 0; j < 1 << i; ++j) {
      ++q[popcnt(S[j] ^ a[i])];
      if (i != k - 1) {
        S[(1 << i) + j] = S[j] ^ a[i];
      }
    }
  }
  for (int i = 0; i < m + 1; ++i) {
    p[i] = q[i];
  }
  long long pow_ = 1;
  for (int i = 0; i < n - k; ++i) {
    pow_ = pow_ * 2 % MOD2;
  }
  for (int i = 0; i < m + 1; ++i) {
    p[i] = p[i] * pow_ % MOD2;
  }
}
void make_cnk() {
  for (int n = 0; n < m + 1; ++n) {
    for (int k = 0; k < m + 1; ++k) {
      if (n == 0) {
        cnk[n][k] = (k == 0);
      } else {
        if (k == 0) {
          cnk[n][k] = 1;
        } else {
          cnk[n][k] = (cnk[n - 1][k] + cnk[n - 1][k - 1]) % MOD2;
        }
      }
    }
  }
}
void make_w() {
  for (int d = 0; d < m + 1; ++d) {
    for (int c = 0; c < m + 1; ++c) {
      for (int pow_ = 0; pow_ < c + 1; ++pow_) {
        long long cur = ((pow_ & 1) ? MOD2 - 1 : 1);
        cur = cur * cnk[d][pow_] % MOD2;
        cur = cur * cnk[m - d][c - pow_] % MOD2;
        w[c][d] = (w[c][d] + cur) % MOD2;
      }
    }
  }
}
long long bin_pow(long long x, long long p) {
  if (p == 0) {
    return 1;
  }
  long long res = bin_pow(x, p >> 1);
  res = res * res % MOD2;
  if (p & 1) {
    res = res * x % MOD2;
  }
  return res;
}
void solve2() {
  for (int i = 0; i < m - k; ++i) {
    int ind = 0;
    int ind_a = 0;
    for (int j = m - 1; j >= 0; --j) {
      if (!in_basis[j]) {
        if (ind == i) {
          ind_a = j;
          break;
        }
        ++ind;
      }
    }
    ind = 0;
    int ind_b = 0;
    for (int j = m - 1; j >= 0; --j) {
      if (in_basis[j]) {
        if (a[ind_b] >> ind_a & 1) {
          b[i] |= 1ll << j;
        }
        ++ind_b;
      } else {
        if (ind == i) {
          b[i] |= 1ll << j;
        }
        ++ind;
      }
    }
  }
  q[0] = 1;
  for (int i = 0; i < m - k; ++i) {
    for (int j = 0; j < 1 << i; ++j) {
      ++q[popcnt(S[j] ^ b[i])];
      if (i != m - k - 1) {
        S[(1 << i) + j] = S[j] ^ b[i];
      }
    }
  }
  make_cnk();
  make_w();
  long long pow_ = 1;
  for (int i = 0; i < m - k; ++i) {
    pow_ = pow_ * 2 % MOD2;
  }
  pow_ = bin_pow(pow_, MOD2 - 2);
  for (int i = 0; i < m + 1; ++i) {
    for (int d = 0; d < m + 1; ++d) {
      p[i] = (p[i] + w[i][d] * q[d]) % MOD2;
    }
    p[i] = p[i] * pow_ % MOD2;
  }
  pow_ = 1;
  for (int i = 0; i < n - k; ++i) {
    pow_ = pow_ * 2 % MOD2;
  }
  for (int i = 0; i < m + 1; ++i) {
    p[i] = p[i] * pow_ % MOD2;
  }
}
signed main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &a[i]);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = m - 1; j >= 0; --j) {
      if (a[i] >> j & 1) {
        if (in_basis[j]) {
          a[i] ^= in_basis[j];
        } else {
          in_basis[j] = a[i];
          break;
        }
      }
    }
  }
  for (int i = m - 1; i >= 0; --i) {
    if (in_basis[i]) {
      a[k] = in_basis[i];
      for (int j = 0; j < k; ++j) {
        if (a[j] >> i & 1) {
          a[j] ^= a[k];
        }
      }
      ++k;
    }
  }
  if (k <= m / 2) {
    solve1();
  } else {
    solve2();
  }
  for (int i = 0; i < m + 1; ++i) {
    printf("%lld ", p[i]);
  }
  return 0;
}