print(*(len(word) for word in input().rstrip('.').split()))