Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	for sc.Scan() {

		str := sc.Text()

		if str == "END OF INPUT" {
			break
		}

		strs := strings.Split(sc.Text(), " ")

		for _, s := range strs {
			fmt.Print(len(s))
		}

		fmt.Println()
	}

}

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))

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

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

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

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

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 += chr(ord('0')+w)
	print(ans)

Python: while True:
    dataset = input().split(' ')
    if dataset == ["END", "OF", "INPUT"]: break
    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:
  s = input()
  if s == "END OF INPUT":
    break
  lst = []
  ind = 0
  count = 0
  while ind < len(s):
    if s[ind] == " ":
      lst.append(count)
      count = 0
    else:
      count += 1
    ind += 1
  lst.append(count)
  print(*lst,sep="")

Python: L=[]
while True:
    a=str(input())
    
    if a=="END OF INPUT":
        break
    
    a=a.split(" ")
    L.append(a)
    b=len(a)
    c=L[0]
    
    for i in range(b):
        d=c[i]
        print(len(d),end="")
    L=[]

    print()

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

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

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

Python: for e in iter(input,'END OF INPUT'):
    print(*[len(x)*(x!='')for x in e.split(' ')], sep='')

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