#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > dp;
vector<int> ans;
int main() {
  string s;
  cin >> s;
  dp.resize(s.size(), vector<int>(s.size(), 0));
  ans.resize(s.size() + 1, 0);
  for (int i = 0; i < s.size(); ++i) {
    dp[i][i] = 1;
    ++ans[dp[i][i]];
  }
  for (int k = 2; k < s.size() + 1; ++k)
    for (int l = 0, r = l + k - 1; r < s.size(); ++l, ++r) {
      if (s[l] == s[r] && (k < 3 || dp[l + 1][r - 1])) {
        dp[l][r] += dp[l][l - 1 + k / 2] + 1;
        ++ans[dp[l][r]];
      }
    }
  for (int i = s.size() - 1; i >= 1; --i) ans[i] += ans[i + 1];
  for (int i = 1; i < ans.size(); ++i) cout << ans[i] << ' ';
  return 0;
}
