Given a dictionary (a set of words that can be used to construct a sentence) and a message (which comes from a sentence which uses only those words, but with all vowels and spaces removed), reconstruct the original sentence using the dictionary words!
The first line contains an integerdenoting the number of words in the dictionary. The next
lines each contain a dictionary word using one or more uppercase English letters. Each word contains at least one consonant.
For the purposes of this problem, the letters,
,
,
, and
are vowels and all other letters are consonants.
The dictionary is followed by a single non-empty line of uppercase consonants representing the no-vowels message. It is guaranteed that the no-vowels message can be constructed in at least one way using only the dictionary words.The total number of letters in all dictionary words is no greater than
. The total number of letters in the no-vowels message does not exceed
.
Output a whitespace-separated sequence of dictionary words that yields the original no-vowels message when all spaces and vowels are removed. If there are multiple reconstructions, choose the one with the largest overall number of vowels. If there are still multiple reconstructions, you may output any one of them. No judge input will require your program to output more thancharacters.