#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
long long rev[(1 << 19)], N, K, res[(1 << 19)];
complex<long double> a[(1 << 19)], b[(1 << 19)];
void setrev() {
  long long steps = (1 << K), curr;
  for (long long i = 0; i < steps; i++) {
    curr = 0;
    for (long long j = 0; j < K; j++) {
      curr = (curr << 1) + ((i >> j) & 1);
    }
    rev[i] = curr;
  }
}
void fft(complex<long double> a[], bool inv) {
  for (long long i = 0; i < N; i++) {
    if (rev[i] > i) swap(a[i], a[rev[i]]);
  }
  for (long long sz = 2, sz2 = 1; sz <= N; sz <<= 1, sz2 <<= 1) {
    long double theta = 2 * PI / sz;
    if (inv) theta = -theta;
    complex<long double> ru(cos(theta), sin(theta));
    for (long long i = 0; i < N; i += sz) {
      complex<long double> curr(1, 0);
      for (long long j = i; j < (i + sz2); j++) {
        complex<long double> t1 = a[j], t2 = a[j + sz2] * curr;
        a[j] = t1 + t2;
        a[j + sz2] = t1 - t2;
        curr *= ru;
      }
    }
  }
}
void multiply(complex<long double> a[], complex<long double> b[],
              long long ans[]) {
  setrev();
  fft(a, 0);
  fft(b, 0);
  for (int i = 0; i < N; i++) {
    a[i] *= b[i];
  }
  fft(a, 1);
  for (int i = 0; i < N; i++) {
    ans[i] = (long long)(a[i].real() / N + 0.5);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, x, y;
  cin >> n >> x;
  long long sz, ans0 = 0;
  vector<long long> vec;
  vec.push_back(-1);
  for (int i = 0; i < n; i++) {
    cin >> y;
    if (y < x) vec.push_back(i);
  }
  vec.push_back(n);
  sz = vec.size() - 2;
  K = 0;
  while ((1 << K) < sz) K++;
  K++;
  N = 1 << K;
  for (int i = 0; i < sz; i++) {
    a[i] = vec[i + 1] - vec[i];
    b[sz - i - 1] = vec[i + 2] - vec[i + 1];
    ans0 += (vec[i + 1] - vec[i]) * (vec[i + 1] - vec[i] - 1) / 2;
  }
  ans0 += (vec[sz + 1] - vec[sz]) * (vec[sz + 1] - vec[sz] - 1) / 2;
  multiply(a, b, res);
  cout << ans0 << " ";
  for (int i = 1; i <= n; i++) {
    if (sz >= i)
      cout << res[sz - i] << " ";
    else
      cout << 0 << " ";
  }
  return 0;
}
