Foreign Languages#2215

Foreign Languages

1 second
64 megabytes
Easy

Papa Vasya is deeply invested in his son's education, especially in learning foreign languages. Recently, they have started learning English. To speed up the process, Papa speaks to Vasya only in English. This naturally creates some difficulties in communication. Each time Vasya says something, Papa has to guess for a while what he actually meant.

Papa knows his son's vocabulary. A dictionary word is considered as possibly meant by Vasya if it appears as a subsequence in the word (the word Vasya said). In other words, if there exists an increasing sequence of indices i_1 < i_2 < \dots < i_m (where is the length of ), such that P_j = T_{i_j} for all j = 1 \ldots m, then Vasya might have meant this dictionary word.

You are given Vasya's vocabulary and the word he said. For each word in the dictionary, determine whether Vasya could have meant it.

Input

The first line contains a single integer .

The next lines contain the dictionary words (one word per line). The last, (K+2)-th line, contains the word said by Vasya, with a length not exceeding . All dictionary words are non-empty.

All words consist of lowercase Latin letters. The total length of all dictionary words will not exceed .

Output

Print lines. On the -th line, print "YES" if Vasya might have meant the -th word from the dictionary, and "NO" otherwise.

Examples

Example 1

Loading
Loading