Patch Installation MacDonald Inc. has developed an antivirus program called MacProtect that has very cool features. McProtect keeps itself up-to-date for new viruses that crop up every now and then by using the patches that are released. These patches can be installed in two ways. A basic user can use the auto-update feature to take care of updating the patches in the right order. Advanced users may choose to disable this feature and manually install patches that they think they require. Arjuna is an advanced user and uses the MacProtect software on his laptop running Windows XP. He uses the manual update feature to install the patches. A patch may be without dependents (prerequisites), or it may depend for its installation on successful installation of all its dependents. A patch without listed dependents can always be successfully installed. For successful installation of a patch with dependents, all its prerequisites should have been successfully installed by Arjuna beforehand. Can you write a program to tell him whether the installation of the sequence of patches was successful or not? INPUT (STDIN) Each testcase consists of a list of dependencies and a list of installation attempts. The first line of input is an integer (n<20) indicating the number of test cases followed by a blank line. The next line is an integer (n<20) that indicates the number of lines of dependencies for the virus patches, and it is followed by a blank line. This is followed by the patch dependencies (exactly one line per patch). Each line of the patch contains the name (strings of non-blank alphabetic characters) of the patch and its (zero or more) dependencies (prerequisites), separated by single blank spaces. A particular prerequisite will appear only once on a line. E.g. A B B is not a valid input, and will not appear as input.The end of the list of patches and their dependencies is marked by a blank line. The next line is an integer that indicates the number of installation attempts. This is followed by a blank line. Then the next lines indicate Arjuna installation attempts, one per line, with no intervening blank lines. Each line contains the order in which Arjuna tried to install the patches, containing the names of patches that he tried to install, separated by one or more blanks. The installation steps appear in chronological order on each line. Each installation attempt may be treated independently of the other installation attempts. Following another blank line, the second test case begins with a line indicating the number of lines of dependencies. The rest is as before. OUTPUT (STDOUT) If the install was unsuccessful, output “Installation unsuccessful.” without quotes. Otherwise output “Installation successful.”, again without quotes.Leave a blank line, and then list the output for the next installation attempt of the first testcase, if any, followed by a blank line. Repeat the above for all testcases. The final string should be terminated by a newline. Sample Input 2 3 A B C B 3 A C B 3 D E F D 2 E F Sample Output Installation successful. Installation unsuccessful. Installation successful. Installation successful. Installation unsuccessful.