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:
/*
 * Author Ayub Subhaniya
 * Institute DA-IICT
 */

import java.io.*;
import java.math.*;
import java.util.*;

public class  Codeforces427{
	
	InputStream in;
	PrintWriter out;
	
	
	void solve() {
		String s=ns();
		int n=s.length();
		boolean isPall[][]=new boolean[n][n];
		for (int i=0;i<n;i++)
			isPall[i][i]=true;
		
		for (int l=2;l<=n;l++)
		{
			for (int i=0;i<=n-l;i++)
			{
				int j=i+l-1;
				isPall[i][j]=(s.charAt(i)==s.charAt(j))&&((i+1)>(j-1)||isPall[i+1][j-1]);
			}
		}
		
		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 (isPall[i][i+1])
				dp[i][i+1]=2;
		
		for (int l=2;l<=n;l++)
		{
			for (int i=n-l;i>=0;i--)
			{
				int j=i+l-1;
				int x=j+1;int y=x+l-1;
				
				if (y<n&&isPall[i][y]&&dp[i][j]==dp[x][y])
				{
					dp[i][y]=Math.max(dp[i][y],dp[i][j]+1);
					//tr(i+" "+j+" "+x+" "+y+" "+dp[i][y]);
				}
				y--;
				
				if (y<n&&isPall[i][y]&&dp[i][j-1]==dp[x][y])
				{
					dp[i][y]=Math.max(dp[i][y], dp[i][j-1]+1);
					//tr(i+" "+j+" "+x+" "+y+" "+dp[i][y]);
				}

			}
		}
		
		
		int charac[]=new int[n+1];
		for (int i=0;i<n;i++)
			for (int j=i;j<n;j++)
			{
				//tr(i+" "+j+" "+dp[i][j]);
				charac[dp[i][j]]++;
			}
		
		for (int i=n-2;i>=0;i--)
			charac[i]+=charac[i+1];
		for (int i=1;i<=n;i++)
			out.print(charac[i]+" ");
	}
	
	
	class FenwickTree {
		int size;
		long bit[][];

		FenwickTree(long arr[][],int n) {
			
			size = n;
			bit = new long[size + 1][size+1];

			for (int i = 1; i <= size; i++)
				for (int j=1;j<=size;j++)
					update(arr[i][j],i,j);
			
		//	for (int i = 1; i <= size; i++)
			//	for (int j=1;j<=size;j++)
			//		if (bit[i][j]>0)
			//			System.out.println(i+" "+j+" "+bit[i][j]);

		}

		void update(long val,int x, int y) {
			//out.println(x+" "+y+" "+val);
			for (; x <= size; x += x & (-x))
			{
				for (int j=y;j<=size;j+=(j&(-j)))
				{
					bit[x][j] += val;
				}
			}
		}

		long query(int x,int y) {
			//tr(x+" "+y);
			long sum = 0;
			for (; x > 0; x -= x & (-x))
			{
				for (int j=y;j>0;j-=(j&(-j)))
				{
					//tr(x+" "+y);
					sum += bit[x][j];
				}
			}
			//tr(x+" "+y+" "+sum);
			return sum;
		}
	}

	
	
	void run() throws Exception {
		String INPUT = "C:/Users/ayubs/Desktop/input.txt";
		in = oj ? System.in : new FileInputStream(INPUT);
		out = new PrintWriter(System.out);
		
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis() - s + "ms");
	
	}
	public static void main(String[] args) throws Exception {
		new Codeforces427().run();
	}
	
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;
	
	private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = in.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}
	
	private boolean inSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}
	
	private int skip() {
		int b;
		while ((b = readByte()) != -1 && inSpaceChar(b))
			;
		return b;
	}
	
	private double nd() {
		return Double.parseDouble(ns());
	}
	
	private char nc() {
		return (char) skip();
	}
	
	private String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(inSpaceChar(b))) { // when nextLine, (inSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	
	private char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(inSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	
	private char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}
	
	private int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	
	private int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		
		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		
		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	
	private void tr(Object... o) {
		if (!oj)
			System.out.println(Arrays.deepToString(o));
	}
	
}