#include <stdio.h>

int main(void)
{
  char buf[256] = {0};
  char *bufp = buf;
  fread(buf, 1, 255, stdin);
    if (*bufp == 'a')
    {
      bufp++;
      if(*bufp == 'b')
      {
        bufp++;
        if(*bufp == 'c')
        {
          bufp++;
          if(*bufp == 'd')
          {
          	bufp++;
            if(*bufp == 'e')
            {
              bufp++;
              printf("abcde detected\n");
            }
          } else
          if (*bufp == '1')
          {
          	bufp++;
            if(*bufp == '2')
            {
              bufp++;
              printf("abc12 detected\n");
            }
          }
        }
      }
    }
  return 0;
}
