#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1 << 19;
struct CD {
  double r, i;
  CD(double r = 0, double i = 0) : r(r), i(i) {}
  void operator/=(const int c) { r /= c, i /= c; }
};
CD operator*(const CD& a, const CD& b) {
  return CD(a.r * b.r - a.i * b.i, a.r * b.i + a.i * b.r);
}
CD operator+(const CD& a, const CD& b) { return CD(a.r + b.r, a.i + b.i); }
CD operator-(const CD& a, const CD& b) { return CD(a.r - b.r, a.i - b.i); }
const double pi = acos(-1.0);
CD cp1[MAXN + 9], cp2[MAXN + 9], w[MAXN + 9];
int R[MAXN + 9];
void dft(CD* a, int n, bool inv) {
  for (int i = (0); i < (int)(n); i++)
    if (R[i] < i) swap(a[R[i]], a[i]);
  for (int m = 2; m <= n; m *= 2) {
    double z = 2 * pi / m * (inv ? -1 : 1);
    CD wi = CD(cos(z), sin(z));
    for (int j = 0; j < n; j += m) {
      CD w = 1;
      for (int k = j, k2 = j + m / 2; k2 < j + m; k++, k2++) {
        CD u = a[k];
        CD v = a[k2] * w;
        a[k] = u + v;
        a[k2] = u - v;
        w = w * wi;
      }
    }
  }
  if (inv)
    for (int i = (0); i < (int)(n); i++) a[i] /= n;
}
vector<long long> multiply(vector<long long>& p1, vector<long long>& p2) {
  int n = p1.size() + p2.size() + 1;
  int m = 1, cnt = 0;
  while (m <= n) m += m, cnt++;
  for (int i = (0); i < (int)(m); i++) {
    R[i] = 0;
    for (int j = (0); j < (int)(cnt); j++) R[i] = (R[i] << 1) | ((i >> j) & 1);
  }
  for (int i = (0); i < (int)(m); i++) cp1[i] = 0, cp2[i] = 0;
  for (int i = (0); i < (int)(p1.size()); i++) cp1[i] = p1[i];
  for (int i = (0); i < (int)(p2.size()); i++) cp2[i] = p2[i];
  dft(cp1, m, false);
  dft(cp2, m, false);
  for (int i = (0); i < (int)(m); i++) cp1[i] = cp1[i] * cp2[i];
  dft(cp1, m, true);
  vector<long long> res;
  n -= 2;
  for (int i = (0); i < (int)(n); i++)
    res.push_back((long long)floor(cp1[i].r + 0.5));
  return res;
}
int n, k, A[MAXN];
vector<long long> le, ri;
int main() {
  while (scanf("%d %d", &n, &k) >= 1) {
    le.clear();
    ri.clear();
    for (int i = (0); i < (int)(n); i++) scanf("%d", &A[i]), A[i] = A[i] < k;
    long long ans0 = 0, cnt = 0;
    for (int i = (0); i < (int)(n); i++) {
      cnt = A[i] == 0 ? cnt + 1 : 0;
      ans0 += cnt;
    }
    printf("%lld", ans0);
    cnt = 0;
    for (int i = (0); i < (int)(n); i++) {
      if (A[i] == 0)
        cnt++;
      else {
        le.push_back(cnt + 1);
        cnt = 0;
      }
    }
    cnt = 0;
    for (int i = n - 1; i >= 0; i--) {
      if (A[i] == 0)
        cnt++;
      else {
        ri.push_back(cnt + 1);
        cnt = 0;
      }
    }
    vector<long long> c = multiply(le, ri);
    for (int i = (0); i < (int)(n); i++) {
      if (i < ((int)le.size()))
        printf(" %lld", c[((int)le.size()) - 1 - i]);
      else
        printf(" 0");
    }
    puts("");
  }
  return 0;
}
