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 MOD = (int)1e9 + 7;
const int N = 5005;
const double PI = 4 * atan(1);
const double eps = 1e-7;
const long long oo = 1e10;
const int K = 205;
int m_m[2] = {31, 37};
int p_p[2] = {(int)1e9 + 7, MOD};
long long po[N][2];
long long h[2][N][2];
int ans[N];
string s;
string t;
int n;
long long vec_to_int(vector<long long> to) { return to[0]; }
void init_po(int n, int num = 1) {
  po[0][0] = po[0][1] = 1;
  for (int j = 0; j < num; j++) {
    for (int i = 1; i <= n; i++) {
      po[i][j] = (po[i - 1][j] * m_m[j]) % p_p[j];
    }
  }
}
void hash_dp(string ch, int num = 1, int pos = 0, char lb = 'a') {
  h[pos][0][0] = h[pos][0][1] = 0;
  for (int j = 0; j < num; j++) {
    for (int i = 0; i < ch.size(); i++) {
      h[pos][i + 1][j] = (h[pos][i][j] + (ch[i] - lb + 1) * po[i][j]) % p_p[j];
    }
  }
}
vector<long long> get_range(int l, int r, int max_index, int num = 1,
                            int pos = 0) {
  vector<long long> to;
  to.assign(num, 0);
  for (int j = 0; j < num; j++) {
    to[j] = (h[pos][r + 1][j] + p_p[j] - h[pos][l][j]) % p_p[j];
    to[j] = (to[j] * po[max_index - l - 1][j]) % p_p[j];
  }
  return to;
}
bool pal[N][N];
bool k_pal[N][N][2];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> s;
  n = s.size();
  init_po(n);
  t = s;
  reverse((t).begin(), (t).end());
  hash_dp(s, 1, 0);
  hash_dp(t, 1, 1);
  for (int i = 0; i < n; i++) {
    for (int j = i; j < n; j++) {
      long long x = vec_to_int(get_range(i, j, n, 1, 0));
      long long y = vec_to_int(get_range(n - j - 1, n - i - 1, n, 1, 1));
      if (x == y) {
        pal[i][j] = 1;
        k_pal[i][j][0] = 1;
        ans[0]++;
      }
    }
  }
  for (int o = 1; o < (n < 13 ? n : 13); o++) {
    int pos = (o & 1);
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        k_pal[i][j][pos] = 0;
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        if (k_pal[i][j][pos ^ 1] == 0) continue;
        int ni = j + 1;
        int nj = j + (j - i + 1);
        if (nj < n && k_pal[ni][nj][pos ^ 1] && pal[i][nj]) {
          k_pal[i][nj][pos] = 1;
          ans[o]++;
        }
        ni = j + 2;
        nj = j + 1 + (j - i + 1);
        if (nj < n && k_pal[ni][nj][pos ^ 1] && pal[i][nj]) {
          k_pal[i][nj][pos] = 1;
          ans[o]++;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}