St Andrews Online Judge

Proper Acronym 2

By Kay Akashi

Time: 2000 ms
Memory: 256000 kB

The code judging system is only available during contests. Check out the github repo for test cases and solutions.

Please log in.

Problem Statement

(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 TT is validly working as a proper acronym of the medical term SS consisting of NN words also given in the input.

Constraints

1TN50001 \leq |T| \leq N \leq 5000. Length of word in SS never exceeds 1010.

Subtask 1 (20%)

1TN101 \leq |T| \leq N \leq 10.

Subtask 2 (80%)

1TN50001 \leq |T| \leq N \leq 5000.

Input

The first line of input consists of single integer, NN, the number of words that compose SS. The second line of input contains NN words, forming SS. The third line of input contains one string, TT, an acronym whose validity you have to judge.

It is ensured that the first letter of each word composing SS is either a capital Latin letter or an Arabic numeral.

Output

If TT is a proper acronym of SS, output "Yes". Otherwise, "No".

Examples

Input

6
Human Epidermal Growth Factor Receptor 2
HER2

Output

Yes

Input

3
Patent Foramen Ovale
PFO

Output

Yes

Input

4
Coronary Artery Bypass Graft
CBAG

Output

No

Input

3
Computerised Axial Tomography
DOG

Output

No

Input

3
Volume Of Distribution
DV

Output

No