#include <bits/stdc++.h>
using namespace std;
const int N = 5500;
char s[N];
int ans[N], dp[N][N];
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  for (int i = 1; i <= n; i++) {
    dp[i][i] = 1;
    ans[1]++;
    if (i < n && s[i] == s[i + 1]) {
      dp[i][i + 1] = 2;
      ans[1]++;
      ans[2]++;
    }
  }
  for (int k = 3; k <= n; k++) {
    for (int i = 1; i + k - 1 <= n; i++) {
      if (dp[i + 1][i + k - 2] && s[i] == s[i + k - 1]) {
        dp[i][i + k - 1] = dp[i][i + k / 2 - 1] + 1;
        for (int j = 1; j <= dp[i][i + k - 1]; j++) ans[j]++;
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
