Problem: Palindromic characteristics of string s with length |s| is a sequence of |s| integers, where k-th number is the total number of non-empty substrings of s which are k-palindromes.

A string is 1-palindrome if and only if it reads the same backward as forward.

A string is k-palindrome (k > 1) if and only if: 

  1. Its left half equals to its right half. 
  2. Its left and right halfs are non-empty (k - 1)-palindromes. 



The left half of string t is its prefix of length ⌊|t| / 2⌋, and right half — the suffix of the same length. ⌊|t| / 2⌋ denotes the length of string t divided by 2, rounded down.

Note that each substring is counted as many times as it appears in the string. For example, in the string "aaa" the substring "a" appears 3 times.

Input

The first line contains the string s (1 ≤ |s| ≤ 5000) consisting of lowercase English letters.

Output

Print |s| integers — palindromic characteristics of string s.

Examples

Input

abba


Output

6 1 0 0 


Input

abacaba


Output

12 4 1 0 0 0 0 

Note

In the first example 1-palindromes are substring «a», «b», «b», «a», «bb», «abba», the substring «bb» is 2-palindrome. There are no 3- and 4-palindromes here.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
__attribute__((constructor)) static void fast_cin() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
}
using ll = int64_t;
using ull = uint64_t;
template <typename T>
ostream &operator<<(ostream &fout, const vector<T> &vec) {
  for (const auto &el : vec) fout << el << ' ';
  return fout;
}
template <typename T>
istream &operator>>(istream &fin, vector<T> &vec) {
  for (size_t i = 0; i < vec.size(); i++) fin >> vec[i];
  return fin;
}
vector<string> split(const string &s, char c) {
  vector<string> v;
  ull st = 0, fn = 0, lvl = 0;
  for (; fn < s.size(); fn++) {
    if (s[fn] == c && lvl == 0) {
      v.push_back(s.substr(st, fn - st));
      st = fn + 1;
    }
    if (s[fn] == '(') {
      lvl++;
    }
    if (s[fn] == ')') {
      lvl--;
    }
  }
  v.push_back(s.substr(st, fn - st));
  return v;
}
void pr_var(vector<string>::iterator it) {
  (void)it;
  cout << endl;
}
template <typename T, typename... Args>
void pr_var(vector<string>::iterator it, T a, Args... args) {
  cout << *it << "=" << a << "  ";
  pr_var(++it, args...);
}
ll div_ceil(ll n, ll d) {
  ll res = n / d;
  if (res >= 0) res += n % d ? 1 : 0;
  return res;
}
ll gcd(ll a, ll b) {
  a = llabs(a);
  b = llabs(b);
  while (a && b) a > b ? a %= b : b %= a;
  return a + b;
}
ll lcm(ll a, ll b) {
  ll c = gcd(a, b);
  return c == 0 ? 0 : llabs(a / c * b);
}
const double PI = acos(-1.0);
constexpr double EPS = 1e-9;
constexpr double INF = 2e18;
using mp = pair<ll, ll>;
using mt = tuple<ll, ll, ll>;
constexpr ll MAX = 5e3 + 5;
uint8_t dp[MAX][MAX];
int main() {
  string s;
  cin >> s;
  ll n = s.size();
  vector<ll> res(n);
  for (ll i = 0; i < n; i++) {
    dp[i][i] = 1;
  }
  for (ll i = 0; i < n; i++) {
    ll len = 1;
    ll l = i, r = i + len;
    if (r >= n) continue;
    if (s[l] == s[r]) dp[l][r] = 2;
  }
  for (ll len = 2; len < n; len++) {
    for (ll i = 0; i < n - len; i++) {
      ll l = i, r = i + len;
      if (r >= n) continue;
      if (s[l] != s[r]) continue;
      if (dp[l + 1][r - 1] == 0) continue;
      ll m = l + (len - 1) / 2;
      dp[l][r] = dp[l][m] + 1;
    }
  }
  for (ll i = 0; i < n; i++) {
    for (ll j = 0; j < n; j++) {
      if (dp[i][j]) res[dp[i][j] - 1]++;
    }
  }
  for (ll i = res.size() - 2; i >= 0; i--) res[i] += res[i + 1];
  cout << res << endl;
  return 0;
}