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: while True:
    retu=input()
    if retu=="END OF INPUT":
        break
    
    moji=retu.split(" ")
    
    n=len(moji)
    
    for i in range(n):
        k=len(moji[i])
        print(k, end="")
    
    print()

Python: import re

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



    ans = []

    for i in a:
       ans.append(len(i))
   
    ans = [str(i) for i in ans]
    ans = "".join(ans)
    print(ans)

Python: while True:
    dataset = input().split()
    if dataset == ["END", "OF", "INPUT"]: break
    print(''.join(map(str, [len(d) for d in dataset])))

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

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

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

Python: flag = True
while flag:
    n = input()
    if n == "END OF INPUT":
      flag = False
    else:
      count = 0
      for c in n:
          if c == " ":
            print(count, end = "")
            count = 0
          else:
            count += 1
      print(count)

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

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

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: while True:
    x=input()
    if x=="END OF INPUT" : break
    ans=0
    for i in x:
        if i!=' ':
            ans+=1
        else:
            print(ans,end="")
            ans=0
    print(ans)

Python: while True:
    x=input()
    if x=="END OF INPUT":
        break
    else:
        l=x.split(" ")
        y=[]
        for i in range(len(l)):
            y.append(len(l[i]))
            print(y[i],end="")
        print("")

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

Python: while True:
    l=[]
  
    w=input()
    if w=="END OF INPUT":
        break
   
    list=w.split(' ')
    
    for i in range(len(list)):
        l.append(len(list[i]))
    l=[str(a) for a in l]
    l=''.join(l)
    print(*l,sep='')

Python: while True:
	string = input()
	if string == 'END OF INPUT':
		break
	ans = []
	temp = 0
	space = 0
	for i in range(len(string)):
		if string[i] == ' ' and space == 0:
			ans.append(temp)
			temp = 0
			space = 1
			continue
		elif space > 0 and string[i] == ' ':
			ans.append(0)
			continue
		space = 0
		temp += 1
	ans.append(temp)
	print(''.join([str(x) for x in ans]))

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: 
while True:
    tmp = input()
    if tmp=="END OF INPUT": break
    tmp = tmp.split(" ")
    
    ans = []
    for i in tmp:
        ans.append(len(i))
    print(*ans,sep="")

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

Python: while True:
    s=str(input())
    if s=="END OF INPUT":
        break
    a,b=[],0
    for i in range(len(s)):
        if s[i]==" ":
            a.append(b)
            b=0
        else:
            b+=1
    a.append(b)
    print(*a,sep='')

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: while True:
    line = input()
    if line == 'END OF INPUT':
        break

    output_count_list = []
    count = 0
    for c in line:
        if c != ' ':
            count += 1
        else:
            output_count_list.append(str(count))
            count = 0
    output_count_list.append(str(count))
    print(''.join(output_count_list))

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

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

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
    i=0
    ans=0
    while i<len(s):
        if s[i]==" ":
            print(ans,end="")
            ans=0
            i+=1
        else :
            ans+=1
            i+=1
    print(ans)

Python: while 1:
    put=input()
    if(put=="END OF INPUT"):
        break
    print(''.join(map(str,map(len,put.split(' ')))))

Python: while True:
    s = input().split()
    if s == ["END","OF","INPUT"]:break
    print("".join(list(map(str,map(len, s)))))

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

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