You are given a string $S$ of length $N$. There are $Q$ queries (numbered from $1$ to $Q$) that you need to answer. For query $i$, determine if a string $T_i$ of length $N$, can be obtained by performing the following algorithm from the initial string $S$.
For instance, you can obtain string SEVERER from string REVERSE by splitting it into R, E, VER, and SE. After reversing the order of the substrings, your substrings will be SE, VER, E, and R. If you concatenate the substrings, then you can obtain string SEVERER.
The first line consists of an integer $N$ ($1 ≤ N ≤ 10\, 000$).
The second line consists of a string $S$ of length $N$.
The third line consists of an integer $Q$ ($1 ≤ Q ≤ 100$)
Each of the next $Q$ lines consists of a string $T_i$ of length $N$.
All strings consist of only upper-case letters.
For each query, output a single line containing a string. If string $T_i$ can be obtained from the algorithm above, output YES. Otherwise, output NO.