#include "string.h"
main()
{
char a[30],*p=a;
gets(a) ;
p=a;
while (*p!='\0')
{
if (*p=='w' && *(p+1)=='o' && *(p+2)=='r' && *(p+3)=='d')
printf ("%d ",p-a+1);
p++;
}
printf("\n");}
main()
{
char a[30],*p=a;
gets(a) ;
p=a;
while (*p!='\0')
{
if (*p=='w' && *(p+1)=='o' && *(p+2)=='r' && *(p+3)=='d')
printf ("%d ",p-a+1);
p++;
}
printf("\n");}