#include <bits/stdc++.h>
const long long MOD = 1000000007;
using namespace std;
int dp[5001][5001];
int sum[5010], ans[5010];
string s;
int main() {
  cin >> s;
  int len = s.size();
  for (int i = 1; i <= len; i++) {
    for (int l = 0; l + i - 1 < len; l++) {
      int r = l + i - 1;
      if (l == r)
        dp[l][r] = 1;
      else if (l == r - 1) {
        if (s[l] == s[r])
          dp[l][r] = 2;
        else
          dp[l][r] = 0;
      } else {
        if (s[l] != s[r] || dp[l + 1][r - 1] == 0)
          dp[l][r] = 0;
        else
          dp[l][r] = dp[l][(int)ceil(1.0 * (l + r) / 2.0) - 1] + 1;
      }
      sum[dp[l][r]]++;
    }
  }
  for (int i = 1; i <= len; i++) {
    for (int j = i; j <= len; j++) ans[i] += sum[j];
    printf("%d ", ans[i]);
  }
  return 0;
}
