Wildcard
#描述#
In computer (software) technology, a wildcard character can be used to substitute for any other character or characters in a string.
<BR>
<BR>
In this problem, only two kinds of wildcard characters are considered:
<BR>
<BR>
'*' : matches any zero or more letters. and
<BR>
'?' : matches exactly one letter
<BR>
<BR>
Given a list of patterns(which may consist of wildcards) and words, you are to find whether the pattern can match the word.(matches are not case sensitive)
#格式#
##输入格式##
The first line of the input contains an integer N (N<=100) indicating the number of case. Then from the second line,
there are 2*N lines,for each line(start at 2),the even one consist a pattern, the odd one consist a word(to be matched by previous line's pattern), you are to find whether the pattern can match the word(at next line of the pattern). The patterns only consisting of letters and wildcards. Each pattern also occupies a single line.
All words and patterns's length less than 200.
##输出格式##
For each pattern and word, if the pattern can match the word, output "Matched!!!", else output "Failed...".
#样例1#
##样例输入1##
1
ab*??ab*ab
abababababab
##样例输出1##
Matched!!!
#限制#
1000ms
32768KB
#提示#
串长200以内
#来源#
LCS