Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func configure(scanner *bufio.Scanner) {
	// scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
}
func getNextString(scanner *bufio.Scanner) string {
	scanned := scanner.Scan()
	if !scanned {
		panic("scan failed")
	}
	return scanner.Text()
}
func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}
func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}
func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}
func main() {
	fp := os.Stdin
	wfp := os.Stdout
	extra := 0
	if os.Getenv("I") == "IronMan" {
		fp, _ = os.Open(os.Getenv("END_GAME"))
		extra = 100
	}
	scanner := bufio.NewScanner(fp)
	configure(scanner)
	writer := bufio.NewWriter(wfp)
	defer func() {
		r := recover()
		if r != nil {
			fmt.Fprintln(writer, r)
		}
		writer.Flush()
	}()
	solve(scanner, writer)
	for i := 0; i < extra; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
}
func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	for s := getNextString(scanner); s != "END OF INPUT"; s = getNextString(scanner) {
		ss := strings.Split(s, " ")
		for i := 0; i < len(ss); i++ {
			fmt.Fprint(writer, len(ss[i]))
		}
		fmt.Fprintln(writer, "")
	}
}

Python: # coding: utf-8
# Your code here!
while True:
    n=input()
    if n=="END OF INPUT":
        break
    
    a=list(n)
    count=0
    for i in range(len(a)):
        if a[i]!=' ':
            count+=1
        else:
            print(count,end="")
            count=0
    print(count)

Python: while True:
    dataset = input().split(' ')
    if dataset == ["END", "OF", "INPUT"]: break
    if dataset[0]=='': dataset = dataset[1:]
    i = tmp = 0
    ans = ''
    while i < len(dataset):
        if dataset[i] == '':
            tmp += 1
        else:
            if tmp:
                ans += str(tmp)
                tmp = 0
                ans += str(len(dataset[i]))
            else:
                ans += str(len(dataset[i]))
        i += 1
    print(ans)

Python: while True:
    m = input()
    if m == "END OF INPUT":
        break
    m = m.split(" ")
    li = []
    for i in m:
        li.append(len(i))
    print("".join(map(str, li)))

Python: while 1:
    n=input()
    if n=="END OF INPUT":
        break
    c=0
    for i in n:
        if i==' ': 
            print(c,end="")
            c=0
        else:c+=1
    print(c)

Python: while True:
    n=input()
    if n=='END OF INPUT':
        break
    c=0
    for i in n :
        if i==' ':
            print(c,end='')
            c=0
        else:
            c+=1
    print(c)

Python: while True:
    s = input()
    if s == 'END OF INPUT': break
    if '  ' in s: s.replace('  ', ' 0 ')
    s = s.split()
    for i in s: print(len(i) if i != '0' else 0, end='')
    print('')

Python: while True:
    number = input().split(' ')
    if number == ['END', 'OF', 'INPUT']: break
    ans = []
    for num in number:
        ans = ans + ['0'] if num == '' else ans + [str(len(num))]
    print(''.join(ans))

Python: while True:
    i = input()
    if i == "END OF INPUT":
        break
    print(*[(x != '') * len(x) for x in i.split(' ')], sep='')

Python: while True:
    s = input()
    if s == 'END OF INPUT': break
    if '  ' in s: s = s.replace('  ', ' 0 ')
    s = s.split()
    for i in s: print(len(i) if i != '0' else 0, end='')
    print('')

Python: while True:
    a = input()
    if a == "END OF INPUT": break
    ans=[]
    cnt=0
    for i in range(len(a)):
        if a[i]== ' ':
            ans.append(cnt)
            cnt=0
        else: 
            cnt+=1
    ans.append(cnt)
    for x in ans:
        print(x, end='')
    print()

Python: while True:
    a=input()
    if a=='END OF INPUT':
        break
    b=list(a)
    c=0
    for i in range(len(b)):
        if b[i]!=' ':
            c+=1
        else:
            print(c,end='')
            c=0
    print(c)

Python: while True:
    text = input()
    
    if text=='END OF INPUT':
        break
    
    TEXT = text.split(' ')
    for i in range(len(TEXT)):
        print(len(TEXT[i]),end='')
    
    print('')

Python: while True:
    st = input()
    if st == "END OF INPUT":
        break
    print("".join(map(lambda x: str(len(x)), st.split(" "))))

Python: while True:
    x=input()
    if x=="END OF INPUT":
        break
    else:
        x=x.replace(" ","-")
        X=x.split("-")
        for i in X:
            if i=="--":
                print(0)
            else:
                print(len(i),end="")
        print()

Python: while True:
    s = input()
    if s == 'END OF INPUT':
        break
    
    # for word in s.split():
    #     print(len(word), end='')
    # print()
    
    count = 0
    for i in range(len(s)):
        if s[i:i + 1] == ' ':
            print(count, end='')
            count = 0
        else:
            count += 1
    
    print(count)

Python: import sys
while True:
	s=sys.stdin.readline().rstrip()
	if s=="END OF INPUT":
		exit()
	s=s.split(" ")
	ans=""
	for i in range(len(s)):
		ans+=str(len(s[i]))
	print(ans)

Python: # 88
while True:
    a = input().split(" ")
    if a == ['END', 'OF', 'INPUT']:
        break

    for i in range(len(a) - 1):
        print(len(a[i]), end="")
    print(len(a[len(a) - 1]))

Python: #import pysnooper
#import os,re,sys,operator,math,heapq,string
#from collections import Counter,deque
#from operator import itemgetter
#from itertools import accumulate,combinations,groupby,combinations_with_replacement
from sys import stdin,setrecursionlimit
#from copy import deepcopy

setrecursionlimit(10**6)
input=stdin.readline

while 1:
    s=input().rstrip()
    if s=="END OF INPUT":
        break
    ans=""
    now=0
    for i in range(len(s)):
        if s[i]==" ":
            ans+=str(now)
            now=0
        else:
            now+=1
    print(ans+str(now))

Python: while 1:
    n=input()
    if n=="END OF INPUT":break
    c=0
    for i in n:
        if i==' ': 
            print(c,end="")
            c=0
        else:c+=1
    print(c)

Python: while True:
    ans = []
    n = input()
    if n == "END OF INPUT":
        break
    else:
        a = n.split(' ')
        for i in range(len(a)):
            ans.append(len(a[i]))
        print(*ans, sep="")

Python: # AOJ 1042: Yes, I have a number
# Python3 2018.7.6 bal4u

while True:
	s = input()
	if s == "END OF INPUT": break
	ans, i, ls = '', 0, len(s)
	while i < ls:
		w = 0
		while i < ls and s[i] == ' ':
			w, i = w+1, i+1
		if w > 1: ans += '0'*(w-1)
		w = 0
		while i < ls and s[i].isalpha():
			w, i = w+1, i+1
		if w > 0: ans += str(w)
	print(ans)

Python: while True:
    a=input()
    if a=="END OF INPUT":
        break
    A=list(a)
    c=0
    for i in range(len(A)):
        if A[i]==' ':
            print(c,end="")
            c=0
        else:
            c+=1
    print(c)

Python: import re
while 1: 
    n=input()
    if n=='END OF INPUT':
        break
    s=re.split('[ ]', n)
    a=len(s)
    for i in range(a):
         print(len(s[i]),end ='')
    print("")

Python: while 1:
    s = input()
    if s == 'END OF INPUT':
        break
    a = list(s.split(' '))
    for i in range(len(a)):
        print(len(a[i]), end='')
    print()

Python: import re
while True:
    a = input()
    if a == 'END OF INPUT':
        break
    b = list(re.split(' ',a))
    c = len(b)
    for i in range(c):
        e = len(b[i])
        print(e,end='')
    print()

Python: while True:
    n = input()
    ans = []
    if n == "END OF INPUT":
        break
    l = n.split(' ')
    for i in range(len(l)):
        ans.append(len(l[i]))
    ans= [str(i) for i in ans]
    print(''.join(ans))