#include <bits/stdc++.h>
using namespace std;
const int N = 5000;
int p[N], n;
char c[N][N];
string s;
void pv(int i, int j, int v) {
  c[i][j] = v;
  p[v - 1]++;
}
void lr(int i, int j) {
  int b = i;
  while (i >= 0 && j < n && s[i] == s[j]) pv(i, j, c[i][b] + 1), i--, j++;
}
int main() {
  cin >> s;
  n = s.size();
  for (int i = 0; i < n; i++) pv(i, i, 1), lr(i - 1, i + 1), lr(i, i + 1);
  for (int i = n - 1; i > 0; i--) p[i - 1] += p[i];
  for (int i = 0; i < n; i++) cout << p[i] << " ";
}
