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.io.IOException;
import java.util.InputMismatchException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Shurikat
 */
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) {
            final char[] line = in.nextLine(5000).toCharArray();
            final int n = line.length;
            int[][] dp = new int[n + 1][n + 1];
            for (int len = 1; len <= n; ++len) {
                for (int l = 0; l <= n - len; ++l) {
                    final int r = l + len - 1;
                    if (l == r) {
                        dp[l][r] = 1;
                    } else if (l + 1 == r) {
                        if (line[l] == line[r]) {
                            dp[l][r] = 2;
                        }
                    } else if (line[l] == line[r] && dp[l + 1][r - 1] != 0) {
                        dp[l][r] = dp[l][l + len / 2 - 1] + 1;
                    }
                }
            }

            int[] cnt = new int[n + 1];
            for (int i = 0; i <= n; ++i) {
                for (int j = 0; j <= n; ++j) {
                    cnt[dp[i][j]]++;
                }
            }

            for (int i = n; i >= 1; --i) {
                cnt[i - 1] += cnt[i];
            }

            for (int k = 1; k <= n; ++k) {
                out.print(cnt[k] + " ");
            }
        }

    }

    static class InputReader implements AutoCloseable {
        private final InputStream in;
        private int capacity;
        private byte[] buffer;
        private int len = 0;
        private int cur = 0;

        public InputReader(InputStream stream) {
            this(stream, 100_000);
        }

        public InputReader(InputStream stream, int capacity) {
            this.in = stream;
            this.capacity = capacity;
            buffer = new byte[capacity];
        }

        private boolean update() {
            if (cur >= len) {
                try {
                    cur = 0;
                    len = in.read(buffer, 0, capacity);
                    if (len <= 0)
                        return false;
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return true;
        }

        private int read() {
            if (update())
                return buffer[cur++];
            else return -1;
        }

        private boolean isSpace(int c) {
            return c == '\n' || c == '\t' || c == '\r' || c == ' ';
        }

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

        private int readSkipSpace() {
            int c;
            do {
                c = read();
            } while (isSpace(c));
            return c;
        }

        public String nextLine(int initialCapacity) {
            StringBuilder res = new StringBuilder(initialCapacity);
            int c = readSkipSpace();
            do {
                res.append((char) (c));
                c = read();
            } while (!isEscape(c));
            return res.toString();
        }


        public void close() throws IOException {
            in.close();
        }

    }
}