Foreign Languages
Papa Vasya is deeply invested in his son's education, particularly in learning foreign languages. Recently, they have embarked on learning English. To accelerate the learning process, Papa communicates with Vasya solely in English. This naturally leads to some communication challenges. Whenever Vasya says something, Papa has to ponder for a while to decipher what Vasya actually meant.
Papa is familiar with his son's vocabulary. A dictionary word (P) is considered a possible meaning of the word (T) (the word Vasya said) if (P) appears as a subsequence within (T). In other words, there must exist an increasing sequence of indices (i_1 < i_2 < ...< i_m) (where (m) is the length of (P)), such that (P[j] = T[i_j]) for all (j = 1 ...m).
You are provided with Vasya's vocabulary and the word he uttered. For each word in the dictionary, you need to determine if it could be what Vasya meant.
Input
The first line of the input contains a single integer (K).
The following (K) lines each contain a word from the dictionary, one per line. The last line, which is the ((K+2))-th line of the input, contains the word spoken by Vasya, with a maximum length of (100,000). All dictionary words are non-empty.
All words consist of lowercase Latin letters. It is guaranteed that the total length of all dictionary words combined does not exceed (1,000,000) characters.
Output
Print (K) lines in the output. On the (i)-th line, write 'YES' if Vasya might have meant the (i)-th word from the dictionary, and 'NO' otherwise.