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

    i = eval(input())

    if i == "END OF INPUT":

        break

    print(("".join(map(str, [0 if x == '' else len(x) for x in i.split(' ')]))))
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)))

while True:
    i = eval(input())
    if i == "END OF INPUT":
        break
    print(("".join(map(str, [0 if x == "" else len(x) for x in i.split(" ")]))))

-    number = input().split(" ") -    if number == ["END", "OF", "INPUT"]: +    i = eval(input()) +    if i == "END OF INPUT": -    ans = [] -    for num in number: -        ans = ans + ["0"] if num == "" else ans + [str(len(num))] -    print(("".join(ans))) +    print(("".join(map(str, [0 if x == "" else len(x) for x in i.split(" ")]))))