#include <bits/stdc++.h>
using namespace std;
int dp[5001][5001], ans[5100], s;
char t[5100];
int main() {
  scanf("%s", t);
  s = strlen(t);
  for (int i = 0; i < s; i++) {
    dp[i][i] = 1;
    if (i > 0 && t[i] == t[i - 1]) dp[i - 1][i] = 2;
  }
  for (int i = 2; i < s; i++)
    for (int j = 0; j + i < s; j++)
      if (t[j] == t[j + i] && dp[j + 1][j + i - 1]) {
        int m;
        if (i % 2)
          m = i / 2, dp[j][j + i] = dp[j][j + m] + 1;
        else
          m = -1 + i / 2, dp[j][j + i] = dp[j][j + m] + 1;
      }
  for (int i = 0; i < s; i++)
    for (int j = i; j < s; j++) ans[dp[i][j]]++;
  for (int i = s - 1; i >= 0; i--) ans[i] += ans[i + 1];
  for (int i = 1; i <= s; i++) printf("%d ", ans[i]);
  printf("\n");
}
