Alphabet Game


Not everyone probably knows that Chef has younder 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 Wi, denoting the ith 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 <= |Wi| <= 12 Each letter will appear in S no more than once. S, Wi 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 Test Case 1 Input (stdin) eat 2 tea ate Expected Output Yes Yes Test Case 2 Input (stdin) tiger 3 get tier great Expected Output Yes Yes No

Program :

# include <stdio.h>

# include <string.h>

int main()


int n,i,j,k;char s[1000];char c1[1000];int x,c;


int y=strlen(s);





















    return 0;