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.InputMismatchException;
import java.io.IOException;
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;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        D835 solver = new D835();
        solver.solve(1, in, out);
        out.close();
    }

    static class D835 {
        char[] cc;
        String S;
        int N;
        int[][] kpal;
        int[] twos = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192};

        void allPal() {
            int i = 0;
            for (; i < N; i++)
                kpal[i][i + 1] = 1;

            for (i = 1; i < N; i++) {
                int low = i - 1, high = i;
                while (low >= 0 && high < N && cc[low] == cc[high]) {
                    kpal[low][high + 1] = 1;
                    low--;
                    high++;
                }
                low = i - 1;
                high = i + 1;
                while (low >= 0 && high < N && cc[low] == cc[high]) {
                    kpal[low][high + 1] = 1;
                    low--;
                    high++;
                }
            }
        }

        public void solve(int testNumber, FastScanner s, PrintWriter out) {
            S = s.next();
            N = S.length();
            kpal = new int[N + 1][N + 1];
            cc = S.toCharArray();
            allPal();

            //aabaa
            int maxK = (int) Math.ceil(Math.log(N * 1.0) / Math.log(2.0));
            for (int k = 2; k <= maxK + 1; k++) {
                for (int i = 0; i < N; i++) {
                    for (int j = i + twos[k - 1]; j <= N; j++) {
                        int mid = (i + j) / 2;
                        //abaaba
                        if (kpal[i][j] >= 1) {
                            if ((j - i) % 2 == 0) {
                                // exact ss
                                if (kpal[i][mid] >= k - 1 && kpal[mid][j] >= k - 1)
                                    kpal[i][j]++;
                            } else {
                                // ignore middle char
                                if (kpal[i][mid] >= k - 1 && kpal[mid + 1][j] >= k - 1)
                                    kpal[i][j]++;
                            }
                        }
                    }
                }
            }

            int[] oot = new int[N];
            for (int k = 1; k <= maxK + 1; k++) {
                for (int i = 0; i <= N; i++) {
                    for (int j = i + 1; j <= N; j++) {
                        if (kpal[i][j] >= k) {
//                        System.out.printf("%d: %d %d%n", k, i, j);
                            oot[k - 1]++;
                        }
                    }
                }
            }

            for (int i : oot)
                out.print(i + " ");
            out.println();

        }

    }

    static class FastScanner {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public FastScanner(InputStream stream) {
            this.stream = stream;
        }

        int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

    }
}