Club "Binary Cat"
The security team at the "Binary Cat" club is always on high alert. The guard logs each visitor's name along with the time they enter or leave the club. He doesn't specify whether the log entry is for an entry or an exit, as he knows that an odd-numbered entry for a person means they entered, while an even-numbered entry means they exited. A special department of the state security service wants to know who was in the club at specific times. Assist the club's security in providing this information.
Input
The first line of the input contains two integers n and m (1 ≤ n ≤ 1000, 1 ≤ m ≤ 1000). Here, n is the number of entries in the security log, and m is the number of queries from the security service. The next n lines describe the log entries in the format "hh:mm:ss name", where hh:mm:ss is the time in standard format (exactly 8 characters), and "name" is the name of the person entering or leaving the club. Names consist of lowercase or uppercase Latin letters and are between 1 and 16 characters long. The entries are sorted in non-decreasing order of time. Following this, there are m lines, each containing a time in the format "hh:mm:ss", representing the moments of interest to the security service. All times in the input refer to a single day.
Output
Produce m lines of output. Each line should list the people present in the club at the specified moment. Start each line with the number of people, followed by their names, separated by spaces. Names can be listed in any order. To ensure no one is missed, if a visitor enters the club at the exact second of interest, consider them present at that second. Similarly, if a visitor exits at that second, they are still considered to be in the club.