#include <bits/stdc++.h>
using namespace std;
const int N = 5010;
const long long x = 131;
const long long MOD = 1e9 + 7;
char s[N];
int dp[N][N];
long long H[N];
long long powx[N];
int num[N];
inline long long Hash(int i, int j) {
  return ((H[j] - H[i - 1] * powx[j - i + 1] % MOD) % MOD + MOD) % MOD;
}
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  for (int i = 1; i <= n; ++i) H[i] = H[i - 1] * x % MOD + s[i], H[i] %= MOD;
  powx[0] = 1;
  for (int i = 1; i <= n; ++i) powx[i] = powx[i - 1] * x % MOD;
  for (int i = 1; i <= n; ++i) dp[i][i] = 1, num[1]++;
  for (int l = 2; l <= n; ++l)
    for (int i = 1; i + l - 1 <= n; ++i) {
      int j = i + l - 1, len = l / 2;
      if (s[i] == s[j] && (i + 1 > j - 1 || dp[i + 1][j - 1])) {
        dp[i][j] = 1;
        if (Hash(i, i + len - 1) == Hash(j - len + 1, j))
          dp[i][j] = dp[i][i + len - 1] + 1;
        num[dp[i][j]]++;
      }
    }
  for (int i = n; i >= 1; --i) num[i] += num[i + 1];
  printf("%d", num[1]);
  for (int i = 2; i <= n; ++i) printf(" %d", num[i]);
}
