import java.util.Scanner;
import java.lang.Math;
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main (String [] args) {
Scanner sc = new Scanner(System.in);
String input = sc.nextLine().trim();
String [] inputs = input.split(" ");
StringBuffer sb = new StringBuffer();
for (int i = 0; i < inputs.length; i++) {
if (inputs[i].isEmpty()) {
continue;
}
if (i == inputs.length - 1) {
int t = inputs[i].trim().length() - 1;
if (t == 0) {
continue;
} else {
sb.append(inputs[i].trim().length() - 1);
}
} else {
sb.append((inputs[i].trim().length() + " "));
}
}
System.out.print(sb.toString().trim());
}
}