The security service at the "Binary Cat" club is always on alert. The guard records the name of each visitor and the time when they enter or leave the club. He does not indicate which event occurred, because the guard knows: an odd number of records for a person means they entered the club, and an even number means they exited. Employees of the special investigations department want to obtain information about visitors who were in the club at certain times. Help the club's security to provide this information.
The first line of the input contains two integers and (1 \leq n \leq 1000, 1 \leq m \leq 1000), where is the number of records in the security log and is the number of queries from the special investigations department. The next lines describe records in the format "hh:mm:ss name", where hh:mm:ss is the time in standard format (exactly characters), and "name" is the name of the person entering or leaving the club. A name consists of lowercase or uppercase Latin letters and has length from to characters inclusive. The records are sorted in order of non-decreasing time. Then lines follow. Each line contains a record "hh:mm:ss" indicating the time of interest to the department. All times in the input are within one day.
Output lines. Each line should contain the list of people who are in the club at the corresponding moment. The list should begin with the number of people, then the sequence of names. Separate elements of the list by spaces. Names can be printed in any order. Since the investigations department does not want to miss anyone from the list, if a visitor entered the club at the queried second, consider them present at that second. If a visitor exited the club at the queried second, still consider them present at that second.
Example 1