#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
int dp[N][N], ispal[N][N], ans[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  {
    string s;
    cin >> s;
    int n = s.length();
    for (long long l = n - 1; l >= 0; l--)
      for (int r = l; r < n; ++r)
        ispal[l][r] = (l + 1 >= r || ispal[l + 1][r - 1]) && s[l] == s[r];
    for (long long l = n - 1; l >= 0; l--) {
      for (int r = l; r < n; ++r) {
        if (ispal[l][r]) {
          dp[l][r] =
              min(dp[l][(r + l + 1 >> 1) - 1], dp[(l + r >> 1) + 1][r]) + 1;
          ++ans[dp[l][r]];
        }
      }
    }
    for (long long i = n - 1 - 1; i >= 0; i--) ans[i] += ans[i + 1];
    for (long long i = 1; i <= n; i++) cout << ans[i] << " ";
  }
}
