#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  string second;
  cin >> second;
  int n = second.size();
  vector<vector<int>> dp(n, vector<int>(n, -1));
  vector<int> ans(n, 0);
  for (int i = 0; i < n; i++) {
    dp[i][i] = 1;
    for (int j = 1; i - j >= 0 && i + j <= n - 1; j++) {
      if (second[i - j] != second[i + j]) break;
      dp[i - j][i + j] = 1;
      if (dp[i - j][i - 1] != -1) dp[i - j][i + j] = dp[i - j][i - 1] + 1;
    }
    for (int j = 1; i - j >= 0 && i + j - 1 <= n - 1; j++) {
      if (second[i - j] != second[i + j - 1]) break;
      dp[i - j][i + j - 1] = 1;
      if (dp[i - j][i - 1] != -1) dp[i - j][i + j - 1] = dp[i - j][i - 1] + 1;
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = i; j < n; j++) {
      for (int p = 0; p < dp[i][j]; p++) ans[p]++;
    }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
