#include <bits/stdc++.h>
using namespace std;
char s[5005];
int dp[5005][5005];
int freq[5005];
int main() {
  int n;
  scanf("%s", s);
  n = strlen(s);
  for (int len = 1; len <= n; len++) {
    for (int l = 0; l + len <= n; l++) {
      int r = l + len - 1;
      int mid = (l + r) / 2;
      if (len == 1) {
        dp[l][r] = 1;
        continue;
      } else if (len == 2 && s[l] == s[r]) {
        dp[l][r] = 2;
        continue;
      } else if (s[l] != s[r] || !dp[l + 1][r - 1])
        continue;
      dp[l][r] = 1;
      if (len & 1) {
        if (s[l] == s[r] && dp[l][mid - 1] && dp[mid + 1][r])
          dp[l][r] = dp[l][mid - 1] + 1;
      } else {
        if (s[l] == s[r] && dp[l][mid] && dp[mid + 1][r])
          dp[l][r] = dp[l][mid] + 1;
      }
    }
  }
  for (int len = 1; len <= n; len++) {
    for (int l = 0; l + len <= n; l++) {
      int r = l + len - 1;
      freq[dp[l][r]]++;
    }
  }
  for (int i = n - 1; i >= 1; i--) freq[i] += freq[i + 1];
  for (int i = 1; i <= n; i++) {
    printf("%d ", freq[i]);
  }
}
