题目描述
Problem description
The mess authority of Hall 1, NIT Durgapur has decided to select a student representative. A special game is organized to select one from all the students. Everyone is sitting in the common room of Hall 1. The order in which the students will play is based on their respective CGPA.Game Description:
First student based on the priority sits on the HOT seat with his back towards a projector displaying N strings sorted lexicographically and containing names of items related to the game of cricket. Countdown starts and the participant randomly announces a string. If the string is in the list, he wins. Otherwise game continues with other students.You are given N number of strings and a string announced by Ravi. You need to answer whether Ravi won or not. NOTE: every string contains only lowercase letters.
Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. First line of each test case has integer N denoting the number of strings. Next N lines of each test case have N lexicographically sorted strings. Last line of each test case contains a string announced by Ravi. Length of each string won’t exceed 100.
Output
For each test case, output only line containing “yes” if Ravi wins or “no” if he doesn’t.
Constraints
1 ≤ T ≤ 1000
1 ≤ N ≤ 1000
Example
Input:
1
2
pitch
yorker
virat
Output:
no
输入格式
见题面
输出格式
见题面