题目描述
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
输入格式
见题面
输出格式
见题面
样例输入
hello
5
world
lo
elo
hl
ol
SAMPLE
样例输出
No
Yes
Yes
Yes
No