/*
  AOJ 1042
  Title:Yes, I have a number
  @kankichi573
*/
#include <stdio.h>

char buf[1000];

main()
{
  char *p;
  int cnt;

  while(1)
    {
      fgets(buf,1000,stdin);
      if(0==strncmp("END OF INPUT",buf,12))
	break;
      for(p=buf,cnt=0;;p++)
	if(*p==' ')
	  {
	    printf("%d",cnt);
	    cnt=0;
	  }
	else if(*p<' ')
	  {
	    printf("%d",cnt);
	    break;
	  }
	else
	  cnt++;
      printf("\n");
    }
  return(0);
}