const int R = 14;
bitset<5001> isp[R][5000];
pii ha[5001][5001];
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int n = sz(s);
rep(i, n)isp[0][i][i + 1] = isp[0][i][i] = 1;
RollingHash rh(s);
rep(i, n)FOR(j, i + 1, n + 1)ha[i][j] = rh.getHash(i, j);
vi ans(n);
ans[0] = n;
for (int len = 0; len <= n-2; ++len) {
for (int i = 1; i + len <= n - 1; ++i) {
if (isp[0][i][i + len] && s[i - 1] == s[i + len]) {
isp[0][i - 1][i + len + 1] = 1;
ans[0]++;
}
}
}
for (int k = 1; k < R; ++k)rep(i, n)FOR(j, i + 2, n + 1) {
int len = (j - i) / 2;
if (isp[k - 1][i][i + len] && isp[k - 1][j - len][j] && ha[i][i + len] == ha[j - len][j]) {
isp[k][i][j] = 1;
ans[k]++;
}
}
rep(i, n)cout << ans[i] << (i != n - 1 ? ' ' : '\n');
}