#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 20;
char s[N];
int dp[N][N], ans[N];
int main() {
  while (scanf("%s", s + 1) != EOF) {
    int n = strlen(s + 1);
    memset(dp, 0, sizeof(dp));
    for (int i = 1; i <= n; i++) dp[i][i] = 1;
    for (int len = 2; len <= n; len++) {
      for (int i = 1; i + len - 1 <= n; i++) {
        int l = i, r = i + len - 1;
        if (len == 2) {
          if (s[l] == s[r]) dp[l][r] = 2;
          continue;
        }
        int m = len >> 1;
        if (s[l] == s[r] && dp[l + 1][r - 1]) {
          dp[l][r] = 1;
          if (dp[l][l + m - 1] && dp[r - m + 1][r])
            dp[l][r] = dp[l][l + m - 1] + 1;
        }
      }
    }
    memset(ans, 0, sizeof(ans));
    for (int len = 1; len <= n; len++) {
      for (int i = 1; i + len - 1 <= n; i++) {
        ans[dp[i][i + len - 1]]++;
      }
    }
    for (int i = n - 1; i >= 1; i--) ans[i] += ans[i + 1];
    for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
