To compose an Interesting Word, you can take apart an Interesting Word and form several Source Words. Just like the Interesting Word "beauty" can be taken apart and form the Source Words "eat" and "buy". After that, Little Gyro made the following regulations:
Now given the Interesting Word and the Source Words, Little Gyro wants to know whether the Interesting Word can be made up by these given Source Words. Please help him.
There are multiple test cases. The first line of the input contains an integer N, indicating the number of test cases. For each test case:
The first line contains a string S and an integer n (1 ≤ |S| ≤, 1 ≤ n ≤ 20), indicating the Interesting Word and the number of the Source Words, |S| indicating the length of the string.
In the following n lines, each line contains a string T (1 ≤ |T| ≤), indicating the following Source Words, |T| indicating the length of each string.
It's guaranteed that the string can only be made up by the lowercase letters, and the sum of the length of the string |S| and |T| of all test cases will not exceed 2×.
For each test case, if the Interesting Word can be made up by these given Source Words, print "Yes" (without quotes), otherwise, print "No" (without quotes) instead.