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 long long MOD = 1e9 + 7;
const long double PI = 3.141592653589793238462643383279502884197;
priority_queue<int, vector<int>, greater<int> > pq;
vector<int> v;
char s[5001];
char is1[5000][5000];
char is2[5000][5000];
char is3[5000][5000];
int dp[5000][5000];
int n;
int go1(int l, int r) {
  if (l > r) return 0;
  if (dp[l][r] != -1) return dp[l][r];
  int sum = is1[l][r];
  sum += go1(l + 1, r) + go1(l, r - 1) - go1(l + 1, r - 1);
  return dp[l][r] = sum;
}
int go2(int l, int r) {
  if (l > r) return 0;
  if (dp[l][r] != -1) return dp[l][r];
  int sum = is1[l][r] && is2[l][(l + r) / 2 - (r - l + 1) % 2] &&
            is2[(l + r) / 2 + 1][r];
  is3[l][r] = sum;
  sum += go2(l + 1, r) + go2(l, r - 1) - go2(l + 1, r - 1);
  return dp[l][r] = sum;
}
int main() {
  memset(dp, -1, sizeof(dp));
  scanf("%s", s);
  n = strlen(s);
  for (int i = 0; i < n; i++) {
    int l = i, r = i;
    while (l >= 0 && r < n && s[l] == s[r]) {
      is1[l][r] = 1;
      l--;
      r++;
    }
    l = i, r = i + 1;
    while (l >= 0 && r < n && s[l] == s[r]) {
      is1[l][r] = 1;
      l--;
      r++;
    }
  }
  int cnt = 1, t = 1;
  while (t < n) {
    t *= 2;
    cnt++;
  }
  printf("%d ", go1(0, n - 1));
  memcpy(is2, is1, sizeof(is1));
  for (int i = 1; i < cnt; i++) {
    memset(dp, -1, sizeof(dp));
    printf("%d ", go2(0, n - 1));
    memcpy(is2, is3, sizeof(is2));
    memset(is3, 0, sizeof(is3));
  }
  for (int i = cnt; i < n; i++) printf("0 ");
}