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

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