#include <stdio.h>
#include <ctype.h>

main()
{
 int state, line;
 char ch;

 state = 0;
 line = 1;
 while ((ch = getchar()) != EOF)
   {
    switch (state)
    {
     case 0:
	     if (isalpha (ch))
	     {
	      putchar (ch);
	      state = 1;
	     }
	     if (ch == '"') state = 2;
	     if (ch == '/') state = 3;
	     if (ch == '\'') state = 6;
	     if (ch == '\n')
	     {
	      line++;
	      state = 0;
	     }
	     break;
     case 1:
	     if ((isalnum (ch)) || (ch == '_'))
	       {
		putchar (ch);
		state = 1;
	       }
	     else if (((isalnum (ch)) == 0) && (ch != '_'))
	       {
		printf (" %d\n", line);
		state = 0;
	       }
	     break;
     case 2:
	     if (ch == '"')
	       state = 0;
	     break;
     case 3:
	     if (ch != '*')
	       state = 0;
	     else state = 4;
	     break;
     case 4:
	     if (ch != '*')
	       state = 4;
	     else state = 5;
	     break;
     case 5:
	     if (ch != '/')
	       state = 4;
	     else state = 0;
	     break;
     case 6:
	     if (ch != '\'')
	       state = 6;
	     else state = 0;
	     break;
    }
   }
}
