Chromosome

No attempts yetTime limit2sMemory limit64 MB

Problem

Sanggeun works at a life science lab and checks whether a chromosome follows one specific pattern. A chromosome is a string made only of uppercase letters (A, B, C, ..., Z). He has to test every chromosome against all of the rules below.

  • The string begins with one letter from {A, B, C, D, E, F}, or with no letter at all.
  • Then comes one or more A.
  • Then comes one or more F.
  • Then comes one or more C.
  • Then comes one letter from {A, B, C, D, E, F} or no letter at all, and nothing may follow it.

Given a string, write a program that decides whether it follows these rules.

Input

The first line contains the number of test cases TT (T20T \le 20). Each of the next TT lines contains one string made only of uppercase letters. Each string is at most 200 characters long.

Output

For each test case, print "Infected!" if the string follows the rules, and "Good" if it does not.