Robot Roll Call

Time limit1sMemory limit128 MB

Problem

Robot Roll Call is about to begin. Following the roster received from Earth, the name of each robot is called out, and if a robot is present it responds by adding its own name to a data stream, which is later relayed back to Earth.

Unfortunately, today communication with Earth is temporarily lost right after the roster arrives. In the meantime the robots present for roll call save their names to the data stream, but lots of other data is saved to the same stream as well. To make the data easy to extract later, every piece of data placed in the stream is separated by whitespace.

Your task is as follows. Given a roll-call roster, scan the accompanying data stream and decide whether each name is present in it. For every name in the roster, report whether or not that name appeared in the data stream. For a name to count as a match it must appear exactly as written in the roster: matching is case-sensitive, and substring matches are not allowed.

Input

The first line contains an integer $t$ ($t > 0$), the number of test sets in the input. It is followed by $t$ test sets.

Each test set starts with an integer $n$ ($0 < n < 26$), the number of names in the roster. The next $n$ lines each contain one roster name. Each name has at most 25 characters and consists only of the characters AZ, az, and 09. Names are unique.

After the names comes an integer $d$ ($0 < d < 100$), the number of lines in the data stream. Each of the following lines holds the characters of the data stream. Every line has at least 1 and at most 100 characters, and the data on a line is separated by whitespace (spaces, tabs, or a combination of the two). Any roster name that appears in the data stream is found within a single line; a name is never split across lines.

Output

For each test set, first print the test-set number (starting at 1) on its own line in the form Test set X:. Then, for each name in roster order, print on its own line <name> is present if the name was found in the data stream, or <name> is absent otherwise.

Separate the outputs of two consecutive test sets with a single blank line.