Sunyoung is spending this semester in Australia as an exchange student.
For the first few days after she arrived she forgot all about home and had a good time. A few weeks in, she started to miss Korea.
So she decided to log in to the server she left behind in Korea and look at the file names in a directory. Every night she read the names one by one and remembered the story attached to each file.
Then one day the server in Korea broke, and a bug appeared: it no longer prints the file names that match a given pattern correctly.
A pattern is a string made of several lowercase letters and one asterisk (*).
A file name matches the pattern if the asterisk can be replaced by some string of lowercase letters so that the result is exactly that file name. The asterisk may also be replaced by the empty string. For example, abcd, ad, and anestonestod all match the pattern a*d, while bcd does not.
Given the pattern and the file names, write a program that decides for each file name whether it matches the pattern.
The first line contains the number of files N. (1≤N≤100)
The second line contains the pattern. It consists of lowercase letters and one asterisk (ASCII value 42), its length is at most 100, and the asterisk is neither the first nor the last character.
Each of the next N lines contains one file name. A file name consists of lowercase letters only and its length is at most 100.
Print N lines. On the i-th line print DA if the i-th file name matches the pattern, and NE if it does not.
DA is Croatian for yes and NE is Croatian for no.