#include <bits/stdc++.h>
using namespace std;
int n, m;
int f[5010][5010], g[5010][5010], ans[5010];
string s;
int main() {
  cin >> s;
  int n = (int)s.length();
  for (int i = 0; i < n; i++) {
    f[i][i] = 1;
    g[i][i] = 1;
  }
  for (int i = n - 2; i >= 0; i--) {
    for (int j = i + 1; j < n; j++) {
      if (s[i] == s[j] && (i + 1 == j || g[i + 1][j - 1])) {
        g[i][j] = 1;
        f[i][j] = f[i][i + (j - i + 1) / 2 - 1] + 1;
      }
    }
  }
  memset(ans, 0, sizeof ans);
  for (int i = 0; i < n; i++) {
    for (int j = i; j < n; j++) {
      if (g[i][j]) ans[f[i][j]]++;
    }
  }
  for (int i = n - 2; i >= 0; i--) {
    ans[i] += ans[i + 1];
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
