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>
namespace IO {
static const int IN_BUF = 1 << 23, OUT_BUF = 1 << 23;
inline char myGetchar() {
  static char buf[IN_BUF], *ps = buf, *pt = buf;
  if (ps == pt) {
    ps = buf, pt = buf + fread(buf, 1, IN_BUF, stdin);
  }
  return ps == pt ? EOF : *ps++;
}
template <typename T>
inline bool read(T &x) {
  bool op = 0;
  char ch = IO::myGetchar();
  x = 0;
  for (; !isdigit(ch) && ch != EOF; ch = IO::myGetchar()) {
    op ^= (ch == '-');
  }
  if (ch == EOF) {
    return false;
  }
  for (; isdigit(ch); ch = IO::myGetchar()) {
    x = x * 10 + (ch ^ '0');
  }
  if (op) {
    x = -x;
  }
  return true;
}
inline int readStr(char *s) {
  int n = 0;
  char ch = IO::myGetchar();
  for (; isspace(ch) && ch != EOF; ch = IO::myGetchar())
    ;
  for (; !isspace(ch) && ch != EOF; ch = IO::myGetchar()) {
    s[n++] = ch;
  }
  s[n] = '\0';
  return n;
}
inline void myPutchar(char x) {
  static char pbuf[OUT_BUF], *pp = pbuf;
  struct _flusher {
    ~_flusher() { fwrite(pbuf, 1, pp - pbuf, stdout); }
  };
  static _flusher outputFlusher;
  if (pp == pbuf + OUT_BUF) {
    fwrite(pbuf, 1, OUT_BUF, stdout);
    pp = pbuf;
  }
  *pp++ = x;
}
template <typename T>
inline void print_(T x) {
  if (x == 0) {
    IO::myPutchar('0');
    return;
  }
  std::vector<int> num;
  if (x < 0) {
    IO::myPutchar('-');
    x = -x;
  }
  for (; x; x /= 10) {
    num.push_back(x % 10);
  }
  while (!num.empty()) {
    IO::myPutchar(num.back() ^ '0');
    num.pop_back();
  }
}
template <typename T>
inline void print(T x, char ch = '\n') {
  print_(x);
  IO::myPutchar(ch);
}
inline void printStr_(const char *s, int n = -1) {
  if (n == -1) {
    n = strlen(s);
  }
  for (int i = 0; i < n; ++i) {
    IO::myPutchar(s[i]);
  }
}
inline void printStr(const char *s, int n = -1, char ch = '\n') {
  printStr_(s, n);
  IO::myPutchar(ch);
}
}  // namespace IO
using namespace IO;
const int P = 998244353, I2 = (P + 1) >> 1;
int n, m, fac[55], inv[55];
std::vector<long long> a, b, c;
std::vector<int> id;
std::vector<int> f, g;
int qpow(int a, int b) {
  int s = 1;
  for (; b; b >>= 1) {
    if (b & 1) {
      s = 1ll * s * a % P;
    }
    a = 1ll * a * a % P;
  }
  return s;
}
bool insert(long long x) {
  for (int i = m - 1; ~i; --i) {
    if (x >> i & 1) {
      if (!a[i]) {
        a[i] = x;
        return true;
      } else {
        x ^= a[i];
      }
    }
  }
  return false;
}
namespace BF {
void dfs(int k, long long now) {
  if (k == (int)b.size()) {
    ++f[__builtin_popcountll(now)];
    return;
  }
  dfs(k + 1, now);
  dfs(k + 1, now ^ b[k]);
}
}  // namespace BF
void dfs(int k, long long now) {
  if (k == (int)id.size()) {
    ++g[__builtin_popcountll(now)];
    return;
  }
  dfs(k + 1, now);
  dfs(k + 1, now ^ (1ll << id[k]) ^ c[id[k]]);
}
int C(int n, int m) {
  if (m < 0 || m > n) {
    return 0;
  }
  return 1ll * fac[n] * inv[m] % P * inv[n - m] % P;
}
int main() {
  read(n), read(m);
  a.resize(m);
  for (int i = 0; i < n; ++i) {
    long long x;
    read(x);
    insert(x);
  }
  for (int i = m - 1; ~i; --i) {
    if (a[i]) {
      for (int j = m - 1; j > i; --j) {
        if (a[j] >> i & 1) {
          a[j] ^= a[i];
        }
      }
    }
  }
  for (int i = 0; i < m; ++i) {
    if (a[i]) {
      b.push_back(a[i]);
    } else {
      id.push_back(i);
    }
  }
  if ((int)b.size() < m / 2) {
    f.resize(m + 1);
    BF::dfs(0, 0);
    for (int i = 0; i <= m; ++i) {
      f[i] = 1ll * f[i] * qpow(2, n - (int)b.size()) % P;
      print(f[i], ' ');
    }
    return 0;
  }
  c.resize(m);
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < m; ++j) {
      c[j] |= (long long)(a[i] >> j & 1) << i;
    }
  }
  g.resize(m + 1);
  dfs(0, 0);
  fac[0] = 1;
  for (int i = 1; i <= m; ++i) {
    fac[i] = 1ll * fac[i - 1] * i % P;
  }
  inv[m] = qpow(fac[m], P - 2);
  for (int i = m; i; --i) {
    inv[i - 1] = 1ll * inv[i] * i % P;
  }
  std::vector<std::vector<int>> F(m + 1, std::vector<int>(m + 1));
  for (int i = 0; i <= m; ++i) {
    for (int j = 0; j <= m; ++j) {
      for (int k = 0; k <= m; ++k) {
        int t = 1ll * C(i, k) * C(m - i, j - k) % P;
        if (k & 1) {
          F[j][i] = (F[j][i] + P - t) % P;
        } else {
          F[j][i] = (F[j][i] + t) % P;
        }
      }
    }
  }
  f.resize(m + 1);
  for (int i = 0; i <= m; ++i) {
    for (int j = 0; j <= m; ++j) {
      f[i] = (f[i] + 1ll * F[i][j] * g[j]) % P;
    }
    f[i] = 1ll * f[i] * qpow(I2, m - (int)b.size()) % P;
    f[i] = 1ll * f[i] * qpow(2, n - (int)b.size()) % P;
    print(f[i], ' ');
  }
}