SP1687 LOGIC2 - Logic II
Description
Some day in 2003 in Byteland began calm and quietly as any other day. Some people went to work, some to school, some to store to buy food. Drivers were traditionally stucked in traffic jams, drinking coffee and reading morning newspaper. Suddenly the regularity of this day was disturbed by huge explosion."They blew up the embassy of Bajtocja!!!" somebody cried. Everybody began to run away in panic.
Police works pretty good in Byteland and first radiocars appeared near the embassy only few seconds after the explosion. All the people near the embassy were detained. Only one of the people is the organizer of the explosion, the others could by just occasional witnesses. It is known, among these M(1
Input Format
Multiple test cases. For each test case:
The first line contains three integers M, N and P. M lines follow, each contains a name of one of the people.All names contain only capital Latin letters and no whitespaces.P lines come next, each contains no more than 250 characters, the speaker and his/her speech. See the example.
You can assume that there's no whitespace at the start and the end of a line, and there are no two consecutive spaces in the input.
Input terminate by EOF.
Output Format
The name of the organizer if you can determine, or _Cannot Determine_ if you find more than one, or _Impossible_ if you find no one.