#include <bits/stdc++.h>
using namespace std;
int f[5005][5005], cnt[5005];
int main() {
  string s;
  cin >> s;
  int n = s.size();
  for (int i = n - 1; i >= 0; --i)
    for (int j = i; j < n; ++j) {
      if (s[i] == s[j] && (j - i <= 1 || f[i + 1][j - 1])) {
        int m = (i + j - 1) / 2;
        f[i][j] = f[i][m] + 1;
        cnt[f[i][j]]++;
      }
    }
  for (int i = n; i >= 1; --i) cnt[i] += cnt[i + 1];
  for (int i = 1; i <= n; ++i) cout << cnt[i] << " ";
}
