You are given a string S and Q query strings (q1, q2, ... , qQ). For each query string, report whether or not it is a subsequence of S.

Input :

The first line contains a string S.

The next line contains a single integer, Q.

The following Q lines each contain 1 query string qi.

Output :

Output Q lines. On the i^th line print "Yes" (without quotes) if qi is a sub-sequence of S, otherwise print "No"  (without quotes).

Constraints :

1 ≤ |S|, |q[i]|, Q ≤ 100,000

Sum of lengths of all query strings ≤ 1,000,000 

All strings consist of lowercase english letters only. ('a'-'z')

SAMPLE INPUT
hello
5
world
lo
elo
hl
ol

SAMPLE OUTPUT
No
Yes
Yes
Yes
No
ind=0
z=""
f=0
x=raw_input()

for _ in xrange(input()):
    f=0
    z=x
    y=raw_input()
    for i in xrange(len(y)):
        if y[i] in z:
            ind=z.index(y[i])
            z=z[ind+1:]
            
            
        else:
            f=1
            break
    if f==1:
        print "No"
    else:
        print "Yes"