// Arup Guha
// 4/21/2016
// Solution to 2016 NAIPC Problem E: K-Inversions

import java.util.*;
import java.io.*;

public class e {

	public static int n;
	public static int len;
	public static int[] order;
	public static double[] cos;
	public static double[] sin;

	public static void main(String[] args) throws Exception {

		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String s = stdin.readLine();
		n = s.length();
		len = Integer.highestOneBit(n);
		if (len < n) len <<=1;
		len <<=1;

		// Building order array for FFT.
		order = new int[2];
		order[1] = 1;

		// Just iterate building next array from previous.
		while (order.length != len) {
			int[] tmp = new int[order.length<<1];
			for (int i=0; i<order.length; i++) {
				tmp[2*i] = order[i];
				tmp[2*i+1] = order[i] + order.length;
			}
			order = tmp;
		}

		// Pre-calculate.
		cos = new double[len];
		for (int i=0; i<len; i++) cos[i] = Math.cos(i*2*Math.PI/len);
		sin = new double[len];
		for (int i=0; i<len; i++) sin[i] = Math.sin(i*2*Math.PI/len);

		// Store these in reverse order as a polynomial.
		int[] b = new int[len];
		for (int i=0; i<n; i++)
			if (s.charAt(i) == 'B')
				b[n-1-i] = 1;

		// And these, forward.
		int[] a = new int[len];
		for (int i=0; i<n; i++)
			if (s.charAt(i) == 'A')
				a[i] = 1;

		// Just multiply.
		long[] res = multiply(a, b);

		// Build polynomial and output.
		StringBuffer sb = new StringBuffer();
		for (int i=n; i<2*n-1; i++)
			sb.append(res[i]+"\n");
		System.out.println(sb);
	}

	public static void fft(double[] real, double[] img, boolean invert) {

		// Re-order numbers to be in fft ordering for combination.
		double[] tmp = new double[len];
		for (int i=0; i<len; i++)
			tmp[i] = real[order[i]];
		for (int i=0; i<len; i++)
			real[i] = tmp[i];

		tmp = new double[len];
		for (int i=0; i<len; i++)
			tmp[i] = img[order[i]];
		for (int i=0; i<len; i++)
			img[i] = tmp[i];

		// size is the size of each grouping (when we combine up) in fft.
		for (int size=2; size<=len; size<<=1) {

			// Set up angle and halfway pt.
			int half = (size>>1);
			int skip = len/size;
			int sign = !invert ? 1 : -1;

			// i is the starting index for this group, j indicates pairs.
			for (int i=0; i<len; i+=size) {
				double aReal = 1, aImg = 0;
				int index = 0;
				for (int j=0; j<half; j++) {
					double fReal = real[i+j], fImg = img[i+j];
					double sReal = real[i+j+half]*cos[index] - img[i+j+half]*sin[index];
					double sImg = img[i+j+half]*cos[index] + real[i+j+half]*sin[index];
					real[i+j] = fReal + sReal;
					img[i+j] = fImg + sImg;
					real[i+j+half] = fReal - sReal;
					img[i+j+half] = fImg - sImg;
					index = (index+sign*skip+len)%len;
				}
			}
		}

		// For inverse transformation, we divide by n (my len).
		if (invert) {
			for (int i=0; i<len; i++) {
				real[i] /= len;
				img[i] /= len;
			}
		}
	}

	public static long[] multiply(int[] a, int[] b) {

		// Copy a.
		double[] reala = new double[len];
		for (int i=0; i<len; i++) reala[i] = a[i];
		double[] imga = new double[len];

		// Copy b.
		double[] realb = new double[len];
		for (int i=0; i<len; i++) realb[i] = b[i];
		double[] imgb = new double[len];

		// Transform into points.
		fft(reala, imga, false);
		fft(realb, imgb, false);

		// Store product pts here.
		double[] realPts = new double[len];
		double[] imgPts = new double[len];

		// Multiply points.
		for (int i=0; i<len; i++) {
			realPts[i] = reala[i]*realb[i] - imga[i]*imgb[i];
			imgPts[i] = reala[i]*imgb[i] + realb[i]*imga[i];
		}

		// Now, convert these points back to a polynomial.
		fft(realPts, imgPts, true);

		// Finally copy over into a result array without doubles.
		long[] res = new long[len];
		for (int i=0; i<len; i++)
			res[i] = Math.round(realPts[i]);
		return res;
	}
}
