#include <bits/stdc++.h>
using namespace std;
const int N = 5000 + 5;
const int mod = 1e9 + 7;
int dp[N][N];
int ans[N];
int pal[N][N];
int main() {
  string s;
  cin >> s;
  int n = s.length();
  for (int i = 0; i < n; i++) {
    pal[i][i] = 1;
    dp[i][i] = 1;
    ans[1]++;
  }
  for (int len = 2; len <= n; len++) {
    for (int i = 0; i < n; i++) {
      int j = i + len - 1;
      pal[i][j] = (i < n and j < n and s[i] == s[j] &&
                   ((i + 1 <= j - 1) ? pal[i + 1][j - 1] : 1));
      if (pal[i][j]) {
        dp[i][j] = dp[i][i + len / 2 - 1] + 1;
        ans[dp[i][j]]++;
      } else
        dp[i][j] = 0;
    }
  }
  for (int i = n; i >= 1; i--) ans[i] += ans[i + 1];
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
