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>
struct MI {
 private:
  char bb[1 << 14];
  FILE* f;
  char *bs, *be;
  char e;
  bool o, l;

 public:
  MI() : f(stdin), bs(0), be(0) {}
  inline char get() {
    if (o) {
      o = 0;
      return e;
    }
    if (bs == be) be = (bs = bb) + fread(bb, 1, sizeof(bb), f);
    if (bs == be) {
      l = 1;
      return -1;
    };
    return *bs++;
  }
  inline void unget(char c) {
    o = 1;
    e = c;
  }
  template <class T>
  inline T read() {
    T r;
    *this > r;
    return r;
  }
  template <class T>
  inline MI& operator>(T&);
};
template <class T>
struct Q {
  const static bool U = T(-1) >= T(0);
  inline void operator()(MI& t, T& r) const {
    r = 0;
    char c;
    bool y = 0;
    if (U)
      for (;;) {
        c = t.get();
        if (c == -1) goto E;
        if (isdigit(c)) break;
      }
    else
      for (;;) {
        c = t.get();
        if (c == -1) goto E;
        if (c == '-') {
          c = t.get();
          if (isdigit(c)) {
            y = 1;
            break;
          };
        } else if (isdigit(c))
          break;
        ;
      };
    for (;;) {
      if (c == -1) goto E;
      if (isdigit(c))
        r = r * 10 + (c ^ 48);
      else
        break;
      c = t.get();
    }
    t.unget(c);
  E:;
    if (y) r = -r;
  }
};
template <>
struct Q<char> {};
template <class T>
inline MI& MI::operator>(T& t) {
  Q<T>()(*this, t);
  return *this;
}
template <class T>
std::ostream& operator<(std::ostream& out, const T& t) {
  return out << t;
}
using std::cout;
MI cin;
const int $n = 200005;
const int $l = 55;
const int mod = 998244353;
inline int add(int x, int y) { return (x += y) >= mod ? x - mod : x; }
inline void Add(int& x, int y) {
  if ((x += y) >= mod) x -= mod;
}
inline int sub(int x, int y) { return (x -= y) < 0 ? x + mod : x; }
inline int n1(int v, int p) { return (p & 1) ? sub(0, v) : v; }
inline long long ksm(long long x, int p = mod - 2) {
  long long ret = 1;
  for (; p; p >>= 1, (x *= x) %= mod)
    if (p & 1) (ret *= x) %= mod;
  return ret;
}
int n, m, k, C[$l][$l], w[$l][$l], t[$l];
long long f[$l], A[$l], B[$l];
template <long long v[$l]>
void dfs(int x, long long p) {
  if (x == k) {
    ++t[__builtin_popcountll(p)];
    return;
  }
  dfs<v>(x + 1, p);
  dfs<v>(x + 1, p ^ v[x]);
}
int main() {
  cin > n > m;
  for (auto __r = (m), i = (0); i <= __r; ++i) {
    C[i][0] = 1;
    for (auto __r = (i), j = ((decltype(i))1); j <= __r; ++j)
      C[i][j] = add(C[i - 1][j - 1], C[i - 1][j]);
  }
  for (auto __r = (n), i = ((decltype(n))1); i <= __r; ++i) {
    long long x = cin.read<long long>();
    for (int j = m; j--;) {
      if (!((x >> j) & 1)) continue;
      if (!f[j]) {
        f[j] = x;
        break;
      }
      x ^= f[j];
    }
  }
  for (auto __r = (m - 1), i = ((decltype(m))0); i <= __r; ++i) {
    if (!f[i]) continue;
    for (auto __r = (i - 1), j = ((decltype(i))0); j <= __r; ++j)
      if ((f[i] >> j) & 1) f[i] ^= f[j];
    for (auto __r = (m - 1), j = ((decltype(m))0); j <= __r; ++j)
      if (!f[j]) A[k] = (A[k] << 1) | ((f[i] >> j) & 1);
    A[k] |= 1LL << (m - k - 1);
    ++k;
  }
  if (k <= 26) {
    dfs<A>(0, 0);
    const auto s = ksm(2, n - k);
    for (auto __r = (m), i = (0); i <= __r; ++i)
      cout < ((long long)t[i] * s % mod) < " \n"[i == m];
    return 0;
  }
  k = m - k;
  for (auto __r = (k - 1), i = ((decltype(k))0); i <= __r; ++i) {
    for (auto __r = (m - k - 1), j = ((decltype(m - k))0); j <= __r; ++j)
      if ((A[j] >> i) & 1) B[i] |= 1LL << j;
    B[i] |= 1LL << (m - i - 1);
  }
  dfs<B>(0, 0);
  const auto s = ksm(2, (n - m + mod - 1) % (mod - 1));
  for (auto __r = (m), i = (0); i <= __r; ++i) {
    int ans = 0;
    for (auto __r = (m), j = (0); j <= __r; ++j) {
      int c = 0;
      for (auto __r = (i), t = (0); t <= __r; ++t)
        Add(c, n1((long long)C[j][t] * C[m - j][i - t] % mod, t));
      ans = (ans + (long long)t[j] * c) % mod;
    }
    cout < ((long long)ans * s % mod) < " \n"[i == m];
  }
}