#include <bits/stdc++.h>
using namespace std;
using llong = long long;
using cd = complex<double>;
using vcd = vector<cd>;
const int maxN = 530000;
const double PI = acos(-1);
int rev[maxN];
cd roots[maxN];
void fft(vcd& a) {
  int n = a.size();
  for (int i = 0; i < n; ++i)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  vcd cur(n);
  for (int len = 1, step = n / 2; len < n; len <<= 1, step >>= 1) {
    for (int st = 0; st < n; st += len + len)
      for (int i = 0, root = 0; i < len; ++i, root += step) {
        cd u = a[st + i], v = roots[root] * a[st + len + i];
        cur[st + i] = u + v;
        cur[st + i + len] = u - v;
      }
    a.swap(cur);
  }
}
void inv(vcd& a) {
  fft(a);
  reverse(a.begin() + 1, a.end());
  for (cd& x : a) x /= a.size();
}
void conv(vcd& a, vcd& b) {
  int n = 1, h = 0;
  while (n < a.size() + b.size()) n *= 2, ++h;
  while (a.size() < n) a.push_back(0);
  while (b.size() < n) b.push_back(0);
  rev[0] = 0;
  --h;
  for (int i = 1, high = -1; i < n; ++i) {
    high += !(i & (i - 1));
    rev[i] = rev[i ^ (1 << high)] | (1 << (h - high));
  }
  double sector = 2. * PI / n, alpha = 0;
  for (int i = 0; i < n; ++i) {
    roots[i] = cd(cos(alpha), sin(alpha));
    alpha += sector;
  }
  fft(a);
  fft(b);
  for (int i = 0; i < n; ++i) a[i] *= b[i];
  inv(a);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, x;
  cin >> n >> x;
  int stn = n;
  vector<int> t(n);
  for (int i = 0; i < n; ++i) {
    cin >> t[i];
    t[i] = (t[i] >= x);
  }
  t.insert(t.begin(), 0);
  vector<int> r;
  for (int i = 0; i < t.size(); ++i) {
    int j = i;
    while (j + 1 < t.size() && t[j + 1] == 1) ++j;
    r.push_back(j - i + 1);
    i = j;
  }
  llong zer = 0;
  for (int i = 0; i < r.size(); ++i) zer += (r[i] * (r[i] - 1LL)) / 2LL;
  vcd a(r.begin(), r.end());
  vcd b(r.rbegin(), r.rend());
  n = r.size();
  conv(a, b);
  cout << zer << ' ';
  for (int i = 1; i <= stn; ++i)
    if (n - 1 + i < a.size())
      cout << llong(a[n - 1 + i].real() + 0.5) << ' ';
    else
      cout << "0 ";
}
