#include <bits/stdc++.h>
using namespace std;
char str[5050];
short lcp[5050][5050], f[5050][5050];
int ans[5050];
int main() {
  scanf("%s", str + 1);
  int len = strlen(str + 1);
  for (int i = len; i >= 1; --i) {
    for (int j = 1; j <= len; ++j) {
      if (str[i] == str[j]) {
        lcp[i][j] = lcp[i + 1][j - 1] + 1;
      } else {
        lcp[i][j] = 0;
      }
    }
  }
  for (int i = 1; i <= len; ++i) {
    f[i][i] = 1;
    for (int j = i + 1; j <= len; ++j) {
      int l = j - i + 1;
      if (lcp[i][j] > l / 2) {
        f[i][j] = f[i][i + l / 2 - 1] + 1;
      }
    }
  }
  for (int i = 1; i <= len; ++i) {
    for (int j = i; j <= len; ++j) {
      ans[f[i][j]]++;
    }
  }
  for (int i = len; i >= 0; --i) {
    ans[i] += ans[i + 1];
  }
  for (int i = 1; i <= len; ++i) {
    cout << ans[i] << " ";
  }
}
