Penguins of Madagascar

Limits 1s, 256 MB

One day the penguins of Madagascar found a string SS... Wait... Wait. Actually the setter of the problem does not like long descriptions. So here is your problem:

You are given a string SS of length NN and some query QQ. In each query, you are given a string BB. You have to answer whether the string BB is a subsequence of SS or not.

A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements. Subsequences for the word "apple" is “apl”, “ple”, “p” etc but “ael”, “alp” is not a subsequence of “apple”.

You have to find query BB is a subsequence of SS or not in each query.

Input

The first line contains an integer NN (1N1051 \le N \le 10^5), the size of string SS. The second line contains a string SS, only lower case letter (‘a’-’z’) and the third line contains an integer QQ (1Q1051 \le Q \le 10^5), the number of queries.

Each of the next lines contains a string BB (1B1001 \le |B| \le 100) to analyze.

Output

For each query, print YES\texttt{YES} if BB is a subsequence of SS or print NO\texttt{NO}.

Sample

InputOutput
16
helloonetwothree
5
hello
one
hren
heeoe
oneho
YES
YES
NO
YES
NO