#include <bits/stdc++.h>
using namespace std;
void solvre() {}
int main() {
  string s;
  cin >> s;
  int tam = s.length();
  int ans[5050] = {0};
  vector<int> pd[5050];
  for (int i = 0; i < tam; i++) {
    pd[i].resize(tam + 1 - i);
    pd[i][0] = 1;
    pd[i][1] = 1;
  }
  for (int j = 2; j <= tam; j++) {
    for (int i = 0; i <= tam - j; i++) {
      if (pd[i + 1][j - 2] > 0 && s[i] == s[i + j - 1]) {
        pd[i][j] = min(pd[i][j / 2], pd[i + (int)ceil(j / 2.0)][j / 2]) + 1;
      } else
        pd[i][j] = 0;
    }
  }
  for (int i = 0; i < tam; i++) {
    for (int j = 1; j <= tam - i; j++) {
      ans[pd[i][j]]++;
    }
  }
  for (int i = tam; i > 0; i--) {
    ans[i] += ans[i + 1];
  }
  for (int i = 1; i <= tam; i++) {
    if (i != 1) cout << " ";
    cout << ans[i];
  }
  cout << endl;
}
