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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

const string eof = "END OF INPUT";
typedef vector <string> VS;
typedef vector <int> VI;
typedef istringstream ISS;

int main() {
    string line;
    while ( getline( cin, line ) ) {
        if ( line == eof ) break;
        string s = line;
        int n = s.size();
        n--;
        int cnt = 0;
        VI L;
        for ( int i = 0; i < n; ++ i ) {
            if ( s[i] == ' ' ) {
                if ( i + 1 < n && s[i+1] == ' ' ) {
                    L.push_back( 0 );
                } else if ( cnt > 0 ) {
                    L.push_back( cnt );
                }
                cnt = 0;
            } else {
                cnt ++;
            }
        }
        if ( cnt > 0 ) L.push_back( cnt );
        for ( VI::iterator it_i = L.begin(); it_i != L.end(); ++ it_i ) {
            cout << *it_i;
        }
        cout << endl;
    }
	return 0;
}

C++: #include <iostream>
#include <string>

using  namespace std;

int main(){
  string text;
  while(true){
    getline(cin,text,'\n');
    if (text=="END OF INPUT")
      break;
    int n = 0;
    for(int i=0;i<(int)text.size();i++){
      if (text[i] ==' '){
	cout <<n;
	n = 0;
      }
      else{
	n++;
      }
    }
    cout <<n << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
#include <map>
#include <sstream>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define EPS 1e-9

int main(){
	string in;
	while(getline(cin,in),in!="END OF INPUT"){
		int p = 1;
		int t = 0;
		in = " " + in;
		while( p<in.size() && (t=in.find(" ",p)) != string::npos ){
			printf("%d",t-p);
			p = t+1;
			//printf("\np:%d\n",t);
		}
		printf("%d\n",in.size()-1-p);
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
    string str;
    while (getline(cin, str)) {
        if (str == "END OF INPUT") break;
        int count = 0;
        for (int i = 0; i < str.size(); i++) {
            if (str[i] == ' ') {
                cout << count;
                count = 0;
            } else {
                count++;
            }
        }
        cout << count << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

template <class T>
void initvv(vector<vector<T> > &v,int a,int b, const T  &t = T()){
	v.assign(a,vector<T>(b,t));
}

//v.erase(unique(v.begin(),v.end()),v.end());

int main(){
	string END="END OF INPUT";
	string s;
	while(getline(cin,s),s!=END){
		s=" "+s;
		int n=s.size();
		rep(i,n){
			// if(i) cout<<" ";
			if(i==n-1){
				break;
			}
			if(s[i]==' '){
				int cnt=0;
				reep(j,i+1,n){
					if(s[j]==' '){
						i=j-1;
						break;
					}
					else if(j==n-1){
						i=j-1;
						break;
					}
					else{
						// cout<<j<<" "<<s[j]<<endl;
						cnt++;
					}
				}
				cout<<cnt;
			}
		}
		cout<<endl;
	}
}