#include <bits/stdc++.h>
using namespace std;
const int maxn = 1200000;
int fft_len, fft_lg, r[maxn];
void ensure_base(int deg) {
  fft_len = 1, fft_lg = 0;
  while (fft_len <= deg) fft_len <<= 1, fft_lg++;
  for (int i = 0; i < fft_len; ++i)
    r[i] = (r[i >> 1] >> 1) | ((i & 1) << (fft_lg - 1));
}
template <int MOD>
struct ntt {
  inline int muln(int x, int y) { return 1LL * x * y % MOD; }
  inline int qpow(int x, int y) {
    int ret = 1;
    for (; y; y >>= 1, x = muln(x, x))
      if (y & 1) ret = muln(ret, x);
    return ret;
  }
  inline int mo(int x) {
    while (x >= MOD) x -= MOD;
    while (x < 0) x += MOD;
    return x;
  }
  inline int inv(int x) { return qpow(x, MOD - 2); }
  const int g = 3, ginv = inv(g);
  void fft(vector<int> &A, int dft) {
    for (int i = 0; i < fft_len; ++i)
      if (i < r[i]) swap(A[i], A[r[i]]);
    for (int mid = 1; mid < fft_len; mid <<= 1) {
      int wn = qpow(dft == 1 ? g : ginv, (MOD - 1) / (mid << 1));
      for (int len = mid << 1, j = 0; j < fft_len; j += len) {
        int w = 1;
        for (int k = 0; k < mid; ++k, w = muln(w, wn)) {
          int x = A[j + k], y = muln(w, A[j + k + mid]);
          A[j + k] = mo(x + y);
          A[j + k + mid] = mo(x - y);
        }
      }
    }
    if (dft == -1) {
      int invn = inv(fft_len);
      for (int i = 0; i < fft_len; ++i) A[i] = muln(A[i], invn);
    }
  }
  vector<int> fft_pmul(vector<int> A, int degA, vector<int> B, int degB) {
    ensure_base(degA + degB);
    A.resize(fft_len), B.resize(fft_len);
    vector<int> ans(fft_len, 0);
    fft(A, 1), fft(B, 1);
    for (int i = 0; i < fft_len; ++i) ans[i] = muln(A[i], B[i]);
    fft(ans, -1);
    return ans;
  }
};
ntt<998244353> sol1;
ntt<1004535809> sol2;
const int invvv = sol2.inv(998244353);
long long combine(int c1, int c2) {
  return (long long)c1 + 998244353LL * sol2.muln(sol2.mo(c2 - c1), invvv);
}
int n, x, a[222222], pref[222222];
vector<int> f(222222), g(222222), a1, a2;
long long res[222222];
int main() {
  scanf("%d%d", &n, &x);
  f[0] = 1;
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), a[i] = a[i] < x;
  for (int i = 1; i <= n; ++i) pref[i] = pref[i - 1] + a[i], f[pref[i]]++;
  for (int i = 0; i <= n; ++i) g[i] = f[n - i];
  a1 = sol1.fft_pmul(f, n, g, n);
  a2 = sol2.fft_pmul(f, n, g, n);
  long long tot = 0, c = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i] == 1)
      tot += 1LL * c * (c + 1) / 2, c = 0;
    else
      c++;
  }
  tot += 1LL * c * (c + 1) / 2;
  printf("%lld ", tot);
  for (int i = 1; i <= n; ++i)
    printf("%lld%c", combine(a1[n + i], a2[n + i]), " \n"[i == n]);
  return 0;
}
