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.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class D {
	
	static int dp[][], p[][], n, cnt[];
	static char[] w;
	
	static int palin(int a, int b){
		if(p[a][b] != - 1) return p[a][b];
		if(a >= b) return 1;
		if(w[a] == w[b]) return p[a][b] = palin(a + 1, b - 1);
		return p[a][b] = 0;
	}
	
	static int solve(int a, int b){
		if(dp[a][b] != - 1) return dp[a][b];
		if(a >= b) return dp[a][b] = 1;
		if(p[a][b] == 0) return 0;
		int m = (a + b) / 2, r;
		r = solve(m + 1, b);
		if(r > 0) return dp[a][b] = r + 1;
		return dp[a][b] = 1;
	}
	
	public static void main(String[] args) throws IOException {
		File inputFile = new File("entrada");
		if (inputFile.exists())
			System.setIn(new FileInputStream(inputFile));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		String line;
		while ((line = in.readLine()) != null) {
			w = line.trim().toCharArray();
			n = w.length;
			dp = new int[n][n];
			p = new int[n][n];
			for(int i = 0; i < n; i++) for(int j = 0; j < n; j++) dp[i][j] = p[i][j] = -1;
			cnt = new int[n + 1];
			for(int i = 0; i < n; i++) for(int j = i; j < n; j++) palin(i, j);
			for(int i = 0; i < n; i++) for(int j = i; j < n; j++) solve(i, j);
			for(int i = 0; i < n; i++) for(int j = i; j < n; j++)if(dp[i][j] != -1) cnt[dp[i][j]]++;
			for(int i = n - 2; i >= 1; i--) cnt[i] += cnt[i + 1];
			for(int i = 1; i <= n; i++){
				if(i != 1) out.append(' ');
				out.append(cnt[i]);
			}
			out.append('\n');
		}
		System.out.print(out);
	}

	public static Integer[] readInts(String line) {
		StringTokenizer st = new StringTokenizer(line.trim());
		Integer a[] = new Integer[st.countTokens()], index = 0;
		while (st.hasMoreTokens())
			a[index++] = Integer.parseInt(st.nextToken());
		return a;
	}

	public static Long[] readLongs(String line) {
		StringTokenizer st = new StringTokenizer(line.trim());
		Long a[] = new Long[st.countTokens()];
		int index = 0;
		while (st.hasMoreTokens())
			a[index++] = Long.parseLong(st.nextToken());
		return a;
	}

	public static Double[] readDoubles(String line) {
		StringTokenizer st = new StringTokenizer(line.trim());
		Double a[] = new Double[st.countTokens()];
		int index = 0;
		while (st.hasMoreTokens())
			a[index++] = Double.parseDouble(st.nextToken());
		return a;
	}
}