Mariah’s favourite part of the holiday season is the abundance of catchy Christmas songs. Every day, Mariah’s mom gives her a ride to school and Mariah asks her to put on a song that is stuck in her head. However, Mariah does not know the names of many of the songs that she sings, so she sings her mom part of the song and hopes that her mom recognizes it.
Mariah does not know all the lyrics to the songs she sings, so she replaces some of the words with words consisting of the string ‘na’ repeated any number of times.
Mariah’s mom knows the titles and lyrics of every Christmas song and she has a good guess of which song Mariah is thinking of. To verify her guess, she’d like to know if the words that Mariah sang match some contiguous subsequence of the lyrics of the song. Can you help her verify her guess?
The first line of input contains an integer , the number of days in the holiday season.
For each of the days, the input contains four lines in the following format:
An integer , the number of words in the song Mariah's mom thinks Mariah is thinking of.
space-separated, lowercase strings , the lyrics of the song.
An integer , the number of words that Mariah sang.
space-separated, lowercase strings , the words that Mariah sang.
It is guaranteed that .
For each day, output
Yes if what Mariah sang could be a part of the song lyrics, or
2 12 make my wish come true all i want for christmas is you 7 na na na for christmas is you 8 jingle bells jingle bells jingle all the way 7 nana bells nana all the way downtown