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 JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.stream.IntStream;
import java.util.Arrays;
import java.io.IOException;
import java.util.stream.Collectors;
import java.io.InputStreamReader;
import java.util.Objects;
import java.util.stream.Stream;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String S = in.next();
            int N = S.length();

            int[][] isPalindrome = new int[N][N];
            for (int[] x : isPalindrome) Arrays.fill(x, -1);
            for (int i = 0; i < N; i++) {
                isPalindrome[i][i] = 0;
                if (i < N - 1 && S.charAt(i) == S.charAt(i + 1)) {
                    isPalindrome[i][i + 1] = isPalindrome[i][i + 1] = 1;
                }
            }


            for (int k = 1; k <= N / 2; k++) {
                for (int left = 0; left < N; left++) {
                    for (int right = left; right <= Math.min(left + 1, N - 1); right++) {
                        int lo = left - k;
                        int hi = right + k;

                        if (lo < 0 || hi >= N) continue;

                        if (isPalindrome[lo + 1][hi - 1] != -1 && S.charAt(lo) == S.charAt(hi)) {
                            isPalindrome[lo][hi] = 0;
                            int m1 = (lo + hi) / 2;
                            int m2 = (lo + hi + 1) / 2;
                            int fe, se;
                            if (m1 == m2) {
                                fe = m1 - 1;
                                se = m1 + 1;
                            } else {
                                fe = m1;
                                se = m2;
                            }

                            if (lo > fe || se > hi) continue;
//                        int st = 0;
//                        while (st < 14 && isPalindrome[lo][fe][st] && isPalindrome[se][hi][st]) {
//                            isPalindrome[lo][hi][st + 1] = true;
//                            st++;
//                        }
                            if (isPalindrome[lo][fe] != -1 && isPalindrome[lo][fe] == isPalindrome[se][hi]) {
                                isPalindrome[lo][hi] = isPalindrome[lo][fe] + 1;
                            }
                        }
                    }
                }
            }

            int[] ans = new int[N];
            for (int i = 0; i < N; i++) {
                for (int j = i; j < N; j++) {
                    for (int st = 0; st < 15; st++) {
                        if (isPalindrome[i][j] >= st) {
                            ans[st]++;
//                        System.out.println(i + " " + j + " " + st);
                        }
                    }
                }
            }
            out.println(Arrays.stream(ans).mapToObj(Objects::toString).collect(Collectors.joining(" ")));
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

    }
}