G. Carlo's Password
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
It's a good contest if it has two problems about strings
— Carlo, Carlo with Mateo to Ahmad

Carlo is trying to escape the barn, so he must find a password to the door.

Given a list $$$s$$$ of $$$n$$$ small strings, a password is acceptable if it's a subsequence of one of the strings in the list.

Given $$$m$$$ possible password, for each password, you should tell Carlo if it's acceptable or not.

Input

The first line contains two integers $$$n$$$ $$$(1 \leq n \leq 5\times10^4)$$$.

The next $$$n$$$ lines contains the list $$$s$$$, the $$$i_{th}$$$ line contains the string $$$s_i$$$ $$$(1 \leq |s_i| \leq 6)$$$.

The next line contains one integer $$$m$$$ $$$(1 \leq m \leq 5\times10^4)$$$.

The next $$$m$$$ lines contains the possible password, each line contains a possible password $$$t$$$ $$$(1 \leq |t| \leq 6)$$$.

Output

For each possible password, if it's acceptable, print "YES", otherwise print "NO".

Example
Input
3
ahmad
abd
jaun
6
jn
ad
acd
aqd
amh
jan
Output
YES
YES
NO
NO
NO
YES