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

Python: # -*- coding: utf-8 -*-
from sys import stdin

while True:
  s = stdin.readline().rstrip()
  if s == 'END OF INPUT':
    break
  ans = ''
  cnt = 0
  for i in s:
    if i == ' ':
      ans += str(cnt)
      cnt = 0
    else:
      cnt += 1
  ans += str(cnt)
  print(ans)

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

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

Python: #1042
import re
while True:
    l = []
    x = str(input())
    if x =='END OF INPUT':
        break
    y = re.split('[ ]',x)
    for i in range(len(y)):
        l.append(len(y[i]))
    for j in range(len(l)-1):
        print(l[j],end='')
    print(l[-1])

Python: # coding: utf-8
#88
import re

while True:
    b = input()
    
    if b=="END OF INPUT":
        break
    
    B = re.split('[ ]',b)
    #print(B)
    
    for i in range (len(B)-1):
        print(len(B[i]),end='')
    print(len(B[-1]))

Python: while True:
    m = str(input());
    if m == "END OF INPUT":
        break;
    l = [i.strip() for i in m.split(' ')]
    for j in range(0,len(l)):
        print(len(l[j]),end = "");
    print();

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

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

Python: while True:
    s = input()
    if s == "END OF INPUT":
        break
    list=[]
    d = 0
    count = 0
    while d < len(s):
        if s[d] == " ":
            list.append(count)
            count = 0
        else:
            count += 1
        d += 1
    list.append(count)
    print(*list,sep="")

Python: import re

while True:
    d = input()
    if d == 'END OF INPUT':
        break
    lst = re.split('[ ]',d)
    p = []
    for i in range(len(lst)):
        p.append(len(lst[i]))
    
    for i in range(len(lst)):
        if lst[i] == ' ':
            p[i] = 0
    P = [str(j) for j in p]
    P = ''.join(P)
    print(P)

Python: while 1:
    word = input()
    if word == "END OF INPUT":
        break

    ans = ""
    cnt = 0
    for w in word:
        if w == " ":
            ans += str(cnt)
            cnt = 0
        else:
            cnt += 1

    ans += str(cnt)
    print(ans)

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