#include <bits/stdc++.h>
using namespace std;
bool dp[5010][5010];
int K[5010][5010];
int ans[5010];
int main() {
  int i, j, n;
  string s;
  cin >> s;
  n = s.length();
  for (i = 0; i < n; ++i) {
    dp[i][i] = true;
    K[i][i] = 1;
    ans[1]++;
    if (i != n - 1) dp[i][i + 1] = (s[i] == s[i + 1]);
  }
  for (i = n - 1; i >= 0; --i)
    for (j = i + 2; j < n; ++j)
      if (s[i] == s[j] and dp[i + 1][j - 1]) dp[i][j] = true;
  for (i = 0; i < n; ++i) {
    for (j = i + 1; j < n; ++j) {
      if (dp[i][j]) {
        K[i][j] = K[i][i + (j - i - 1) / 2] + 1;
        ans[K[i][j]]++;
      }
    }
  }
  for (i = n - 1; i >= 1; --i) {
    ans[i] += ans[i + 1];
  }
  for (i = 1; i <= n; ++i) {
    printf("%d ", ans[i]);
  }
  return 0;
}
