One of the literary entertainments is a findword—a text in which other words can be hidden at the junction of two words. For example, in the text "Был месяц май. Кактус стоял на окне." the word "майка" is hidden.
Find all the hidden words from the given list that are present in the text, where word separators are spaces, line endings, and a specified set of punctuation marks.
The first line contains three integers separated by at least space: —the number of lines of text, (1 \leq k \leq 100), with each line containing no more than characters; —the number of words to find, (1 \leq n \leq 100); and —the number of punctuation marks (0 \leq m \leq 10) that can separate words. The next lines contain the text (composed of lowercase and uppercase Latin letters, digits, spaces, and punctuation marks from the given set). Then, lines contain the words to search for (from the same set of characters, excluding spaces and punctuation marks, each line no more than characters, and all words are unique). The final line consists of characters, which should be considered punctuation marks (in the text, punctuation marks may or may not be separated by spaces).
Output the found words, one per line, in the order in which they are hidden in the text (a word can only be hidden at the junction of two words, not entirely within another word). The order of a word is determined by the position of its first letter in the text. If a hidden word appears more than once, output it only once, according to where it is hidden for the first time. If two words are hidden at the same place, output them in the order they appear in the input. It is guaranteed that at least one of the searched words is actually hidden.
Example 1