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>
#pragma warning(disable : 4996)
using namespace std;
const int maxn = 50008;
char stra[100008];
int dp[5010][5010];
int p[maxn << 1];
int Len[maxn << 1];
void manacher(char s[]) {
  int len = strlen(s), id = 0, maxlen = 0;
  for (int i = len; i >= 0; --i) {
    s[i + i + 2] = s[i];
    s[i + i + 1] = '#';
  }
  s[0] = '*';
  for (int i = 2; i < 2 * len + 1; ++i) {
    if (p[id] + id > i)
      p[i] = min(p[2 * id - i], p[id] + id - i);
    else
      p[i] = 1;
    while (s[i - p[i]] == s[i + p[i]]) ++p[i];
    if (id + p[id] < i + p[i]) id = i;
    if (i % 2 == 0) Len[i / 2 - 1] = p[i] - 1;
  }
}
int getdp(int ft, int ed) {
  if (dp[ft][ed] != -1) {
    return dp[ft][ed];
  }
  int nft = ((ft + 1) << 1);
  int ned = ((ed + 1) << 1);
  int nmid = ((nft + ned) >> 1);
  if (nmid - nft + 1 <= p[nmid]) {
    return dp[ft][ed] = 1 + getdp(ft, ft + ((ed - ft + 1) >> 1) - 1);
  } else {
    return 0;
  }
}
int ansa[100008];
int main() {
  memset(dp, -1, sizeof(dp));
  scanf("%s", stra);
  int lena = strlen(stra);
  manacher(stra);
  for (int i = 0; i < lena; i++) {
    dp[i][i] = 1;
  }
  for (int ft = 0; ft < lena; ft++) {
    for (int ed = ft; ed < lena; ed++) {
      ansa[getdp(ft, ed)]++;
    }
  }
  for (int i = lena - 1; i >= 1; i--) {
    ansa[i] += ansa[i + 1];
  }
  for (int i = 1; i <= lena; i++) {
    printf("%d ", ansa[i]);
  }
  printf("\n");
  return 0;
}