Night at Nicholas
Here and there was this long-awaited night for all kids. All children impatiently waiting for this moment - when they wake up in the morning, and there, under the pillow, a lot of different gifts and sweets. Many children on the eve of this holiday write letters to St. Nicholas. Someone requested a new toy, some videos, but someone new laptop…
Our main hero, Vasilko, without exception, he also wrote a letter. But soon, somehow Vasilko learned about the variety of gifts, which is in St. Nicholas..
Now he wondered what it would receive in the morning, when it consisted of M order of things and he knows that the range is Nicholas N things.
Input
In the first line is an integer N (N<=100000) – the number of items in the assortment of Nicholas, in the next N lines is given a list of things (their names). In the (N+2)-th row contains an integer M (M<=100000) – number of things that Vasilek wrote in his letter in the next M lines specify a list of things that he wanted to get.
The names of things are composed of small Latin letters and the name length does not exceed 20 characters. Number of goods of some kind, if it is in the range is not limited.
Output
In the first line, print out the number of K (K<=M) – the number of things that will Vasilek. The followingK lines of their enumeration in the order in which they were asked for input.