#include <bits/stdc++.h>
using namespace std;
string a;
int dp[5010][5010];
int cnt[100010];
int main() {
  cin >> a;
  int t = a.size();
  for (int i = 0; i < t; i++) {
    dp[i][i] = 1;
    cnt[1]++;
  }
  for (int i = 0; i < t - 1; i++) {
    if (a[i] == a[i + 1]) {
      dp[i][i + 1] = 2;
      cnt[2]++;
    }
  }
  for (int i = 2; i < t; i++) {
    for (int y = 0; y < t; y++) {
      if (i + y >= t) continue;
      if (a[y] == a[i + y] && dp[y + 1][i + y - 1]) {
        int mid = ((i + 1) / 2 - 1);
        int ch = min(dp[y][mid + y], dp[i + y - mid][i + y]);
        dp[y][y + i] = ch + 1;
        cnt[ch + 1]++;
      }
    }
  }
  for (int i = 100000; i >= 0; i--) cnt[i] += cnt[i + 1];
  for (int i = 1; i <= t; i++) printf("%d ", cnt[i]);
}
