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.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        new Main().run(in, out);
        out.close();
    }

    public static long mod = 17352642619633L;
    static long p = 31;

    char[] ca;
    int N;
    void run(FastScanner in, PrintWriter out) {

        ca = in.next().toCharArray();
        int N = ca.length;

        int[][] dp = new int[N][N];
        int[] ret = new int[N];
        for (int len = 1; len <= N; len++) {
            for (int l = 0, r = len-1; r < N; l++, r++) {

                if (len == 1) {
                    dp[l][r] = 1;
                    ret[0]++;
                } else if (len == 2) {
                    if (ca[l] == ca[r]) {
                        dp[l][r] = 2;
                        ret[1]++;
                    }
                } else if (ca[l] == ca[r] && dp[l+1][r-1] != 0) {

                    // 0 1 2 3 4 5 -> 6/2 = 2 -> [0,2]
                    // 0 1 2 -> 3/2 = 1 -> [0,1]
                    // bacab
                    int half = (l+r-1)/2;
                    dp[l][r] = dp[l][half] + 1;
                    ret[dp[l][r]-1]++;
                }
            }
        }

        for (int i = N-2; i >= 0; i--) {
            ret[i] += ret[i+1];
        }

        for (int x : ret) out.print(x + " ");
        out.println();

    }

    long[] hash;
    static long[] pPow = new long[5005];
    static {
        pPow[0] = 1;
        for (int i = 1; i < pPow.length; i++) {
            pPow[i] = pPow[i-1] * p;
        }
    }

    long hashBetween(int l, int r) {
        return hash[r+1]-hash[l]*pPow[r-l+1];
    }



    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            st = null;
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}