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;
const int MAX_N = 5e+3;
const long long p = 29;
const long long mod = 1000000007;
long long dp[MAX_N][MAX_N];
long long pot[MAX_N + 1];
struct Hash {
  long long h[MAX_N];
  void precalculate(string &s) {
    int l = s.size();
    h[0] = s[0] - 'a';
    for (int i = 1; i < l; i++) h[i] = (h[i - 1] * p + (s[i] - 'a')) % mod;
  }
  long long hPref(int i, int j) {
    if (i == 0) return h[j];
    return (h[j] - (h[i - 1] * pot[j - i + 1]) % mod + mod) % mod;
  }
} hs, hr;
void potCalc(int l) {
  pot[0] = 1LL;
  for (int i = 1; i <= l; i++) pot[i] = (pot[i - 1] * p) % mod;
}
bool check(int l, int r, int n) {
  if (l == r) return true;
  if (hs.hPref(l, r) == hr.hPref(n - r - 1, n - l - 1)) return true;
  return false;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, r;
  cin >> s;
  r = s;
  int l = s.size();
  potCalc(l);
  reverse(r.begin(), r.end());
  hs.precalculate(s);
  hr.precalculate(r);
  vector<int> answer;
  for (int i = 0; i < l; i++) answer.push_back(0);
  for (int j = 0; j < l; j++) {
    for (int i = 0; i < l; i++) {
      int x = i;
      int y = i + j;
      if (x == l or y == l) break;
      if (check(x, y, l)) {
        if (x == y) {
          answer[0]++;
          dp[x][x] = 1;
        } else {
          int len = y - x + 1;
          int len2 = len / 2;
          dp[x][y] = dp[x][x + len2 - 1] + 1;
          for (int k = 0; k < dp[x][y]; k++) answer[k]++;
        }
      }
    }
  }
  for (int i = 0; i < l; i++) cout << answer[i] << " ";
  return 0;
}