By Kay Akashi
(This problem is a continuation of Proper Acronym. )
Kay is still struggling with memorising the medical terms today. Recently, Kay is observing weird acronyms that are in common use in the field of medicine. For example, in his oncology lecture, he learnt the protein named Human Epidermal Growth Factor Receptor 2 (the protein that promotes the growth of cancer cells particularly in female breast). Seeing this protein name, he initially presumed that the given acronym for this protein was "HEGFR2". However, the acronym widely acknowledged for this is actually "HER2"!
The rule for this sort of acronym is that, you can take the first letters of each word that composes the name, but don't necessarily have to take all of them unless the resulting acronym becomes an empty sequence. Also, the order of letters must not be altered. Furthermore, you must not include any letter that does not appear in the original name. Lastly, you are not allowed to duplicate the letters. (e.g. Technically, Human Epidermal Growth Factor Receptor 2 can be HER2, HGF, E, or R2, but cannot be RH2, HER3, HHEEGGFFRR22, or 2RFGEH (not exhaustive)).
Based on the aforementioned rules, your task is to judge if the given acronym is validly working as a proper acronym of the medical term consisting of words also given in the input.
. Length of word in never exceeds .
.
.
The first line of input consists of single integer, , the number of words that compose . The second line of input contains words, forming . The third line of input contains one string, , an acronym whose validity you have to judge.
It is ensured that the first letter of each word composing is either a capital Latin letter or an Arabic numeral.
If is a proper acronym of , output "Yes". Otherwise, "No".
6
Human Epidermal Growth Factor Receptor 2
HER2
Yes
3
Patent Foramen Ovale
PFO
Yes
4
Coronary Artery Bypass Graft
CBAG
No
3
Computerised Axial Tomography
DOG
No
3
Volume Of Distribution
DV
No