题目描述
Read problems statements in Mandarin Chinese, Russian and Vietnamese as well.
Not everyone probably knows that Chef has younger brother Jeff. Currently Jeff learns to read.
He knows some subset of the letter of Latin alphabet. In order to help Jeff to study, Chef gave him a book with the text consisting of N words. Jeff can read a word iff it consists only of the letters he knows.
Now Chef is curious about which words his brother will be able to read, and which are not. Please help him!
------ Input ------
The first line of the input contains a lowercase Latin letter string S, consisting of the letters Jeff can read. Every letter will appear in S no more than once.
The second line of the input contains an integer N denoting the number of words in the book.
Each of the following N lines contains a single lowecase Latin letter string W_{i}, denoting the i^{th} word in the book.
------ Output ------
For each of the words, output "Yes" (without quotes) in case Jeff can read it, and "No" (without quotes) otherwise.
------ Constraints ------
$1 ≤ |S| ≤ 26$
$1 ≤ N ≤ 1000$
$1 ≤ |W_{i}| ≤ 12$
$Each letter will appear in S no more than once.$
$S, W_{i} consist only of lowercase Latin letters.$
------ Subtasks ------
$Subtask #1 (31 point): |S| = 1, i.e. Jeff knows only one letter.$
$Subtask #2 (69 point) : no additional constraints$
----- Sample Input 1 ------
act
2
cat
dog
----- Sample Output 1 ------
Yes
No
----- explanation 1 ------
The first word can be read.
The second word contains the letters d, o and g that aren't known by Jeff.
输入格式
见题面
输出格式
见题面