import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class main {
	static String du;
	static int i;
	static int solve() {
		if (i>du.length()) return 0;
		int c = 0,max = 0;
		while (i<du.length()&&du.charAt(i)!='u') {
			c++;
			i++;
			int sol = solve();
			System.out.print(sol+" "+c+" ");
			if (sol + c>max) max = sol + c;
		}
		i++;
		return max;
	}
	
	public static void main(String[] args) throws FileNotFoundException {
		Scanner in = new Scanner(new File("input.txt"));
		PrintWriter out = new PrintWriter(new File("output.txt"));
		du = in.nextLine();
		i = 0;
		int max = 0;
		int c = 0;
		for (int j=0;j<du.length();j++) {
			if (du.charAt(j)=='d') {c++;
			if (c>max) max = c;
			}else c--;
		}
		out.print(max+" "+solve());
		in.close();
		out.flush();
		out.close();
	}
}