Problems
Chromosome
Chromosome
At a biomedical research center, the technician must examine a string of chromosome to see if it matches a particular pattern. Each string consists of any uppercase alphabet (i.e., \textbf{A}, \textbf{B}, \textbf{C}, …, \textbf{Z}). Currently, the technician must find if the string exactly matches the following rules:
\begin{itemize}
\item Starting with zero or exactly one alphabet from \textbf{\{A, B, C, D, E, F\}}
\item Following by at least one or more of alphabet \textbf{A}
\item Following by at least one or more alphabet \textbf{F}
\item Following by at least one or more alphabet \textbf{C}
\item Following by zero or exactly one alphabet from \textbf{\{A, B, C, D, E, F\}}
\end{itemize}
You job is to write a program that performs this check.
\InputFile
First line of input is a number of test cases \textbf{T} ≤ \textbf{20}. Each test case is a line contains only uppercase alphabet without any whitespace and at most \textbf{200} alphabets.
\OutputFile
For each test case, display "\textbf{Infected!}" in one line if that string matches the pattern described above. Otherwise, output "\textbf{Good}" in one line.
\textit{\textbf{Note:}} Do not output the '\textbf{"}' symbol. It is used for clarification purpose.
Input example #1
15 AFC AAFC AAAFFCC AAFCC BAFC QWEDFGHJMNB DFAFCB ABCDEFC DADC SDFGHJKLQWERTYU AAAAAAAAAAAAABBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCDDDDDDDDDDDEEEEEEEEEEEEEEEFFFFFFFFC AAAFFFFFBBBBCCCAAAFFFF ABCDEFAAAFFFCCCABCDEF AFCP AAFFCPP
Output example #1
Infected! Infected! Infected! Infected! Infected! Good Good Good Good Good Good Good Good Good Good