Question: There exists a question which humankind has been trying to answer for ages: What does the fox say? Determined to discover the ancient mysterythe sound
There exists a question which humankind has been trying to answer for ages:
What does the fox say?
Determined to discover the ancient mysterythe sound that the fox makesyou went into the forest, armed with a very good digital audio recorder. The forest is, however, full of animals voices, and on your recording, many different sounds can be heard. But you are well prepared for your task: you know exactly all the sounds which other animals make. Therefore the rest of the recordingall the unidentified noisesmust have been made by the fox.
Input
The first line of input contains the number of test cases . The descriptions of the test cases follow:
The first line of each test case contains the recordingwords over lower case English alphabet, separated by spaces. Each contains at most 100 letters and there are no more than 100 words. The next few lines are your pre-gathered information about other animals, in the format
The last line of the test case is exactly the question you are supposed to answer: what does the fox say?
Output
For each test case, output one line containing the sounds made by the fox, in the order from the recording. You may assume that the fox was not silent (contrary to popular belief, foxes do not communicate by Morse code).
1
Sample Input
1 toot woof wa ow ow ow pa blub blub pa toot pa blub pa pa ow pow toot dog goes woof fish goes blub elephant goes toot seal goes ow what does the fox say?
Sample Output
wa pa pa pa pa pa pow
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
