#include <iostream>

using namespace std;

int main () {
	string str;
	while (getline(cin, str)){
		int res = 0;
		for (int i = 0; i < str.size(); i++){
			if (str[i] == ' ' || str[i] == '.'){
				cout << res << " ";
				res = 0;
			}else if (str[i] == '.'){
				break;
			}else{
				res++;
			}
		}
	}
	return 0;
}