We all know how great of a detective Sherlock Holmes is. However, suddenly he's stuck in a rather odd case.
There was a murder, and upon investigation, Sherlock noticed that the victim had scratched the floor with her nails and tried to write something. As he is a great detective, it didn't take much time for him to understand that she tried to write the name of the killer. Unfortunately, the killer noticed her actions. Before she could finish writing the name, he killed her. Upon further investigation, Sherlock found some blood under the victim's nails.
Now he has two leads: a partial name of the killer and the blood type of the killer. Sherlock came to a solution that he will check all the people there and categorize them into three categories:
Suspected: A person is considered suspected if and only if the partial name exists in his/her name.
Guilty: A person will be considered guilty if he/she is already suspected and his/her blood type also matches.
Not guilty: A person will be proven not guilty otherwise.
Due to the numerous individuals present at the time of the murder, categorizing them is a heavy computational task. Sherlock Holmes has gathered the names and blood types of all individuals present at the crime scene. Now, as a young programmer, Sherlock Holmes seeks your help to categorize them.
The first line contains a single integer — the length of the fractional part.
The second line contains two strings, of size and representing the fractional part and blood type. There can be only six types of blood: , , , , , and .
The third line consists of two integers and — the length of people's names and the number of people respectively. The length of names is consistent for all individuals.
The next lines contain two strings and indicating the name and blood type of the person respectively.
Note that names are case sensitive meaning “Abid” and “abid” will be considered different.
For each person, print “Suspected” or “Guilty” or “Not guilty” accordingly.
Check sample cases to understand better.
Input | Output |
---|---|
4 caca B- 10 4 bcbccbaabc B- bbbccaabbc B- bcacabcaaa O+ acabacbccb B+ | Not guilty Not guilty Suspected Not guilty |
Input | Output |
---|---|
2 ac B+ 3 8 cba O- cab A+ baa O+ abc O- cac O+ aab B+ bcc B+ acb B+ | Not guilty Not guilty Not guilty Not guilty Suspected Not guilty Not guilty Guilty |
Be careful about the newline(‘\n’) at the end.