#include <bits/stdc++.h>
using namespace std;
const int N = 5000 + 5;
char s[N];
int dp[N][N];
bool isp[N][N];
int ans[N];
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  for (int i = 1; i <= n; i++) {
    dp[i][i] = 1;
    isp[i][i] = 1;
    ans[1]++;
  }
  for (int len = 2; len <= n; len++) {
    for (int i = 1; i + len - 1 <= n; i++) {
      int j = i + len - 1;
      if (len == 2) {
        if (s[i] == s[j]) isp[i][j] = 1;
      } else if (isp[i + 1][j - 1] == 1 && s[i] == s[j])
        isp[i][j] = 1;
    }
  }
  for (int len = 2; len <= n; len++) {
    int mid = len >> 1;
    for (int i = 1; i + len - 1 <= n; i++) {
      int j = i + len - 1;
      if (isp[i][j]) {
        dp[i][j] = dp[i][i + mid - 1] + 1;
        ans[dp[i][j]]++;
      }
    }
  }
  for (int i = n - 1; i >= 1; i--) ans[i] += ans[i + 1];
  for (int i = 1; i <= n; i++) printf("%d%c", ans[i], i == n ? '\n' : ' ');
  return 0;
}
