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


public class PalindromicCharacteristics {
	static private String leftHalf(String s) {
		return s.substring(0,  s.length()/2);
	}
	
	static private String rightHalf(String s) {
		return s.substring((int)Math.ceil(s.length()/2.0), s.length());
	}
	
	
	static boolean isPalindrome(String s) {
		  int n = s.length();
		  for (int i = 0; i < (n/2); ++i) {
		     if (s.charAt(i) != s.charAt(n - i - 1)) {
		         return false;
		     }
		  }

		  return true;
	}
	
	
	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		String l = fs.next();

		
		
		int n = l.length();
		int[][] mat = new int[n][n];
		
		for(int i=0; i<n; ++i) {
			mat[i][i] = 1;
		}
		
//		for(int i=0; i<n; ++i) {
//			for(int j=0; j<n; ++j) {
//				System.out.print(mat[i][j] + " ");
//			}
//			System.out.println();
//		}
		
		
		
		for(int ra=1; ra<n; ++ra) {
			for(int i=0; i<n; ++i) {
				int j = i+ra;
				if(j>=n) break;
//				System.out.println(i + " " + j);
				if(l.charAt(i) == l.charAt(j) && (i+1>j-1 || mat[i+1][j-1]>0)) {
//					System.out.println("VLEZE");
					int leftH = (i+j)%2==0?(i+j)/2-1:(i+j)/2;
					int rightH = (i+j)/2+1;
					mat[i][j] = Math.min(mat[i][leftH], mat[rightH][j]) + 1;
//					System.out.println(mat[i][leftH] + " " + mat[rightH][j]);
				}
//				System.out.println();
				
			}
		}
		
		int[] sol = new int[n];
		for(int i=0; i<n; ++i) {
			for(int j=0; j<n; ++j) {
				if(mat[i][j] > 0)
				sol[mat[i][j]-1]++;
			}
		}
		int sum = 0;
		Stack<Integer> stack = new Stack<>();
		for(int i=n-1; i>=0; i--) {
			sum+=sol[i];
			stack.push(sum);
		}
		while(!stack.isEmpty()) 
		{
			System.out.print(stack.pop() + " ");
		}
		
	}
}



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

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

    public 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++];
    }

    public int nextInt()
    {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-')
        {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do
        {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    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();
    }
    
    public double nextDouble() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        double res = 0;
        while (!isSpaceChar(c) && c != '.') {
            if (c == 'e' || c == 'E')
                return res * Math.pow(10, nextInt());
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        }
        if (c == '.') {
            c = read();
            double m = 1;
            while (!isSpaceChar(c)) {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                m /= 10;
                res += (c - '0') * m;
                c = read();
            }
        }
        return res * sgn;
    }
    
    public long nextLong() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }
    
    public boolean isSpaceChar(int c)
    {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }
    
    public boolean isLineEndChar(int c)
    {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == '\n' || c == '\r' || c == -1;
    }

    public interface SpaceCharFilter
    {
        public boolean isSpaceChar(int ch);
    }
}