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.*;
import java.util.*;
import java.math.*;
 
//Sub_To_Errichto
public class Main {
    //static final long MOD = 1000000007L;
    static final long MOD = 998244353L;
    static final int INF = 50000000;
    static final int NINF = -500000000;
    
    static final long BASE = 31L;
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter pw = new PrintWriter(System.out);
        
        String s = sc.next();
        int N = s.length();
        long[] hash = new long[N+1];
        long[] pow = new long[N+1];
        long[] invpow = new long[N+1];
        pow[0] = 1L;
        invpow[0] = 1L;
        for (int i = 1; i <= N; i++) {
        	pow[i] = (BASE*pow[i-1])%MOD;
        	invpow[i] = power(pow[i],MOD-2,MOD);
        	hash[i] = (hash[i-1]+pow[i-1]*(1+s.charAt(i-1)-'a'))%MOD;
        }
        int[][] dp = new int[N][N];
        for (int i = 0; i < N; i++)
        	dp[i][i] = 1;
        for (int i = 0; i < N-1; i++) {
        	if (s.charAt(i)==s.charAt(i+1))
        		dp[i][i+1] = 1;
        }
        for (int sz = 3; sz <= N; sz++) {
        	for (int i = 0; i <= N-sz; i++) {
        		int j = i+sz-1;
        		if (s.charAt(i)==s.charAt(j))
        			dp[i][j] = dp[i+1][j-1];
        	}
        }
        for (int sz = 2; sz <= N; sz++) {
        	for (int i = 0; i <= N-sz; i++) {
        		int j = i+sz-1;
        		int r1 = (i+j-1)/2;
        		int l2 = (i+j+2)/2;
        		if (dp[i][r1]==0 || dp[l2][j]==0 || dp[i][r1]!=dp[l2][j])
        			continue;
        		long h1 = ((hash[r1+1]-hash[i]+MOD)*invpow[i])%MOD;
        		long h2 = ((hash[j+1]-hash[l2]+MOD)*invpow[l2])%MOD;
        		if (h1==h2)
        			dp[i][j] = Math.max(dp[i][j],dp[i][r1]+1);
        	}
        }
        
        int[] ans = new int[N];
        for (int i = 0; i < N; i++) {
        	for (int j = i; j < N; j++) {
        		if (dp[i][j]>0)
        			ans[dp[i][j]-1] += 1;
        	}
        }
        for (int i = 1; i < N; i++) {
        	if (ans[i]==0)
        		continue;
        	for (int j = i-1; j >= 0; j--)
        		ans[j] += ans[i];
        }
        
        for (int a: ans)
        	pw.print(a + " ");
        
        pw.close();
    }

    //Fast exponentiation (x^y mod m)
    public static long power(long x, long y, long m) {
    	long ans = 1;
    	x %= m;
    	while (y > 0) {
    		if((y&1)==1)
    			ans = (ans * x) % m;
    		y /= 2;
    		x = (x * x) % m;
    	}
    	return ans;
    }
    
    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
 
        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int ni() {
            return Integer.parseInt(next());
        }
 
        long nl() {
            return Long.parseLong(next());
        }
 
        double nd() {
            return Double.parseDouble(next());
        }
 
        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}