#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int mod[2] = {998244353, 7340033}, primitive[2] = {15311432, 2187},
              offset[2] = {23, 20};
template <int which>
int lgput(int x, int y, int r = 1) {
  while (y) {
    if (y % 2) r = ((ll)r * x) % mod[which];
    x = ((ll)x * x) % mod[which];
    y /= 2;
  }
  return r;
}
template <int which>
void ntt(vector<int>& v, bool inv = false) {
  assert(__builtin_popcount(v.size()) == 1);
  const int n = v.size(), lg = __builtin_ctz(n);
  for (int i = 1, ir = (1 << (lg - 1)); i < n - 1; ++i) {
    if (i < ir) swap(v[i], v[ir]);
    int j = (1 << (lg - 1));
    while (ir & j) {
      ir ^= j;
      j /= 2;
    }
    ir ^= j;
  }
  static vector<int> w;
  w.resize(n);
  for (int len = 2; len <= n; len *= 2) {
    int w0 = (inv ? lgput<which>(primitive[which], (1 << offset[which]) / len)
                  : lgput<which>(lgput<which>(primitive[which], mod[which] - 2),
                                 (1 << offset[which]) / len));
    w[0] = 1;
    for (int i = 1; i < len; ++i) w[i] = ((ll)w[i - 1] * w0) % mod[which];
    for (int st = 0; st < n; st += len) {
      for (int i = 0; i < len / 2; ++i) {
        int tmp = ((ll)w[i] * v[st + i + len / 2]) % mod[which];
        v[st + i + len / 2] = v[st + i] - tmp;
        if (v[st + i + len / 2] < 0) v[st + i + len / 2] += mod[which];
        v[st + i] = v[st + i] + tmp;
        if (v[st + i] >= mod[which]) v[st + i] -= mod[which];
      }
    }
  }
  int tmp = lgput<which>(n, mod[which] - 2);
  if (inv)
    for (auto& x : v) x = ((ll)x * tmp) % mod[which];
}
template <int which>
vector<int> inner_convolute(vector<int> a, vector<int> b) {
  while (__builtin_popcount(a.size()) != 1) a.push_back(0);
  while (__builtin_popcount(b.size()) != 1) b.push_back(0);
  a.resize(2 * a.size(), 0);
  b.resize(2 * b.size(), 0);
  ntt<which>(a);
  ntt<which>(b);
  for (int i = 0; i < (int)a.size(); ++i) a[i] = ((ll)a[i] * b[i]) % mod[which];
  ntt<which>(a, true);
  return a;
}
constexpr long long m = (long long)mod[0] * mod[1];
long long add(long long x, ll y) {
  if (x + y >= m) return x + y - m;
  return x + y;
}
ll times(ll x, ll y) {
  ll r = 0;
  while (y) {
    if (y % 2) r = add(r, x);
    x = add(x, x);
    y /= 2;
  }
  return r;
}
vector<long long> convolute(vector<int> a, vector<int> b) {
  auto p = inner_convolute<0>(a, b);
  auto q = inner_convolute<1>(a, b);
  vector<long long> ret(max(p.size(), q.size()));
  for (int i = 0; i < p.size() || i < q.size(); ++i) {
    int vp = (i < p.size() ? p[i] : 0), vq = (i < q.size() ? q[i] : 0);
    const ll m2 = 96127235, m1 = m - 706818;
    ret[i] = (times(vp, (ll)mod[1] * m2) + times(vq, times(mod[0], m1))) % m;
  }
  return ret;
}
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> cnt(n + 1, 0);
  cnt[0] = 1;
  int cur_cnt = 0;
  for (int i = 1, x; i <= n; ++i) {
    cin >> x;
    cur_cnt += (x < k ? 1 : 0);
    ++cnt[cur_cnt];
  }
  vector<int> revcnt = cnt;
  reverse(begin(revcnt), end(revcnt));
  auto ret = convolute(cnt, revcnt);
  long long ret0 = 0;
  for (int i = 0; i < cnt.size(); ++i)
    ret0 += ((long long)cnt[i] * cnt[i] - cnt[i]) / 2;
  cout << ret0 << ' ';
  for (int i = n + 1; i < 2 * n + 1; ++i) cout << ret[i] << ' ';
  return 0;
}
