For each string from the given set , check whether it contains as a substring at least one string from the set .
The first line contains the number of strings (1 \leq n \leq 1000) in the set . Each of the next lines contains a nonempty string. It is guaranteed that the total length of all strings from the set does not exceed .
The remainder of the input contains the strings from the set . Each line consists of ASCII characters with codes from to inclusive. A string may be empty.
It is guaranteed that the size of the input file does not exceed MB.
Print all the strings from set (in the same order as in the input) that contain as a substring at least one string from set .
Example 1