#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
void fft(vector<complex<double> > &a, bool inverse) {
  int sz = a.size();
  for (int i = 1, j = 0; i < sz; i++) {
    int bit = sz >> 1;
    for (; j >= bit; bit >>= 1) {
      j -= bit;
    }
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= sz; len <<= 1) {
    double ang = 2 * PI / len;
    if (inverse) ang *= -1.0;
    complex<double> wlen(cos(ang), sin(ang));
    for (int i = 0; i < sz; i += len) {
      complex<double> w(1, 0);
      for (int j = 0; j < len / 2; j++, w *= wlen) {
        complex<double> u = a[i + j], v = w * a[i + j + len / 2];
        a[i + j] = u + v;
        a[i + j + len / 2] = u - v;
      }
    }
  }
  if (inverse) {
    for (int i = 0; i < sz; i++) {
      a[i] /= sz;
    }
  }
}
vector<long long> multiply(vector<long long> &a, vector<long long> &b) {
  vector<complex<double> > fa(a.begin(), a.end()), fb(b.begin(), b.end());
  int sz = 1;
  while (sz < max(a.size(), b.size())) {
    sz <<= 1;
  }
  sz <<= 1;
  fa.resize(sz), fb.resize(sz);
  fft(fa, 0), fft(fb, 0);
  for (int i = 0; i < fa.size(); i++) {
    fa[i] *= fb[i];
  }
  fft(fa, 1);
  vector<long long> res(sz, 0);
  for (int i = 0; i < fa.size(); i++) {
    res[i] = (long long)(fa[i].real() + 0.5);
  }
  return res;
}
int main() {
  int n, x, val, cnt = 0, tot = 0;
  long long pol0 = 0;
  scanf("%d%d", &n, &x);
  vector<long long> pol(n + 1), revpol(n + 1);
  pol[0] = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &val);
    if (val < x) {
      ++cnt;
      pol0 += 1LL * tot * (tot + 1) / 2;
      tot = 0;
    } else {
      tot++;
    }
    pol[cnt]++;
  }
  pol0 += 1LL * tot * (tot + 1) / 2;
  tot = 0;
  revpol = pol;
  reverse(revpol.begin(), revpol.end());
  pol = multiply(revpol, pol);
  printf("%lld ", pol0);
  for (int i = 1; i <= n; i++) {
    printf("%lld ", pol[i + n]);
  }
  printf("\n");
  return 0;
}
