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;
namespace ioput {
template <typename T>
T read() {
  T x = 0, f = 1;
  char c = getchar_unlocked();
  while ((c < '0') || (c > '9')) {
    if (c == '-') f = -1;
    c = getchar_unlocked();
  }
  while ((c >= '0') && (c <= '9'))
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar_unlocked();
  return x * f;
}
template <typename T>
void write(T x, char c) {
  static char t[20];
  static int tlen;
  t[tlen = 1] = c;
  if (x < 0) putchar_unlocked('-'), x = -x;
  do t[++tlen] = x % 10 + '0', x /= 10;
  while (x);
  while (tlen) putchar_unlocked(t[tlen--]);
}
}  // namespace ioput
using namespace ioput;
const int maxn = 5005;
const unsigned long long MUL = 1e9 + 7;
char s[maxn];
int n, cnt[maxn][maxn], ans[maxn];
unsigned long long hs[maxn], ds[maxn], Pow[maxn];
unsigned long long hs_val(int i, int j) {
  return hs[j] - hs[i - 1] * Pow[j - i + 1];
}
unsigned long long ds_val(int i, int j) {
  return ds[i] - ds[j + 1] * Pow[j - i + 1];
}
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  Pow[0] = 1;
  for (int i = 1, iend = n; i <= iend; ++i) {
    hs[i] = hs[i - 1] * MUL + s[i];
    cnt[i][i] = 1, ++ans[1];
    Pow[i] = Pow[i - 1] * MUL;
  }
  for (int i = n, iend = 1; i >= iend; --i) ds[i] = ds[i + 1] * MUL + s[i];
  for (int l = 2, lend = n; l <= lend; ++l) {
    for (int i = 1, iend = n; i <= iend; ++i) {
      int j = i + l - 1;
      if (j > n) break;
      int mid = (i + j) >> 1;
      if (l & 1) {
        if (hs_val(i, mid - 1) == ds_val(mid + 1, j))
          cnt[i][j] = cnt[i][mid - 1] + 1, ++ans[cnt[i][j]];
      } else {
        if (hs_val(i, mid) == ds_val(mid + 1, j))
          cnt[i][j] = cnt[i][mid] + 1, ++ans[cnt[i][j]];
      }
    }
  }
  for (int i = n - 1, iend = 1; i >= iend; --i) ans[i] += ans[i + 1];
  for (int i = 1, iend = n; i <= iend; ++i)
    write(ans[i], i == iend ? '\n' : ' ');
  return 0;
}