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;
void exgcd(int a, int b, int& x, int& y) {
  if (!b) {
    x = 1, y = 0;
  } else {
    exgcd(b, a % b, y, x);
    y -= (a / b) * x;
  }
}
int inv(int a, int n) {
  int x, y;
  exgcd(a, n, x, y);
  return (x < 0) ? (x + n) : (x);
}
const int Mod = 998244353;
template <const int Mod = ::Mod>
class Z {
 public:
  int v;
  Z() : v(0) {}
  Z(int x) : v(x) {}
  Z(long long x) : v(x % Mod) {}
  friend Z operator+(const Z& a, const Z& b) {
    int x;
    return Z(((x = a.v + b.v) >= Mod) ? (x - Mod) : (x));
  }
  friend Z operator-(const Z& a, const Z& b) {
    int x;
    return Z(((x = a.v - b.v) < 0) ? (x + Mod) : (x));
  }
  friend Z operator*(const Z& a, const Z& b) { return Z(a.v * 1ll * b.v); }
  friend Z operator~(const Z& a) { return inv(a.v, Mod); }
  friend Z operator-(const Z& a) { return Z(0) - a; }
  Z& operator+=(Z b) { return *this = *this + b; }
  Z& operator-=(Z b) { return *this = *this - b; }
  Z& operator*=(Z b) { return *this = *this * b; }
  friend bool operator==(const Z& a, const Z& b) { return a.v == b.v; }
};
Z<> qpow(Z<> a, int p) {
  Z<> rt = Z<>(1), pa = a;
  for (; p; p >>= 1, pa = pa * pa) {
    if (p & 1) {
      rt = rt * pa;
    }
  }
  return rt;
}
const int bzmax = 60;
int n, m;
typedef class LinearBasis {
 public:
  long long a[bzmax];
  LinearBasis() { memset(a, 0, sizeof(a)); }
  bool insert(long long x) {
    for (int i = m; i-- && x;) {
      if ((x >> i) & 1) {
        x ^= a[i];
      }
      if ((x >> i) & 1) {
        a[i] = x;
        for (int j = i - 1; ~j; j--) {
          if ((a[i] >> j) & 1) {
            a[i] ^= a[j];
          }
        }
        for (int j = i + 1; j < m; j++) {
          if ((a[j] >> i) & 1) {
            a[j] ^= a[i];
          }
        }
        return true;
      }
    }
    return false;
  }
  LinearBasis dual() {
    LinearBasis rt;
    for (int i = m; i--;) {
      if (!a[i]) {
        long long x = 1ll << i;
        for (int j = i + 1; j < m; j++) {
          if ((a[j] >> i) & 1) {
            x |= 1ll << j;
          }
        }
        rt.insert(x);
      }
    }
    return rt;
  }
} LinearBasis;
LinearBasis lb;
vector<Z<> > calc(LinearBasis& lb) {
  vector<long long> a;
  for (int i = 0; i < m; i++) {
    if (lb.a[i]) {
      a.push_back(lb.a[i]);
    }
  }
  int sz = a.size();
  int half = sz >> 1;
  vector<long long> vl(1 << half, 0ll), vr(1 << (sz - half), 0ll);
  for (int s = 0, _ = 1 << half; s < _; s++) {
    for (int i = 0; i < half; i++) {
      if ((s >> i) & 1) {
        vl[s] ^= a[i];
      }
    }
  }
  for (int s = 0, _ = 1 << (sz - half); s < _; s++) {
    for (int i = 0; i < sz - half; i++) {
      if ((s >> i) & 1) {
        vr[s] ^= a[i + half];
      }
    }
  }
  vector<int> rt(m + 1, 0);
  int msk = (1 << half) - 1;
  for (int s = 0, _ = 1 << sz; s < _; s++) {
    rt[__builtin_popcountll(vl[s & msk] ^ vr[s >> half])]++;
  }
  vector<Z<> > _rt(m + 1);
  for (int i = 0; i <= m; i++) {
    _rt[i] = rt[i];
  }
  return _rt;
}
Z<> f[60][60];
int main() {
  scanf("%d%d", &n, &m);
  int rk = 0;
  for (int i = 0; i < n; i++) {
    long long x;
    scanf("%lld", &x);
    rk += lb.insert(x);
  }
  vector<Z<> > ans;
  if (rk * 2 <= m) {
    ans = calc(lb);
  } else {
    lb = lb.dual();
    auto v = calc(lb);
    f[0][0] = 1;
    for (int i = 1; i <= m; i++) {
      for (int j = i; j; j--) {
        f[0][j] += f[0][j - 1];
      }
    }
    for (int i = 1; i <= m; i++) {
      memcpy(f[i], f[i - 1], sizeof(Z<>) * (m + 1));
      for (int j = 1; j <= m; j++) {
        f[i][j] -= f[i][j - 1];
      }
      for (int j = m; j; j--) {
        f[i][j] -= f[i][j - 1];
      }
    }
    ans.resize(m + 1, Z<>(0));
    for (int k = 0; k <= m; k++) {
      for (int c = 0; c <= m; c++) {
        ans[k] += f[c][k] * v[c];
      }
    }
    Z<> coef = ~qpow(2, m - rk);
    for (auto& x : ans) {
      x *= coef;
    }
  }
  Z<> coef = qpow(2, n - rk);
  for (auto x : ans) {
    x *= coef;
    printf("%d ", x.v);
  }
  return 0;
}