Now is spring ! The sunshine is warm , the flowers is coming out . How lovely it is! So my classmates and I want to go out for a spring-outing.
But we all select courses ourselves. We don't have classes at the same time.Now our monitor has a big trouble in arranging the time of the spring-outing.
Can you help him?
I will give you our courses information and the time of the spring-outing.You just need to tell me that who can't go with us.
The first line contains an integer CA which indicates the number of test cases.
Then CA cases follow.
Each case contains two parts,the students' courses information and the query.
In the first part ,first there is an integer N（N<200） which means the number of the student,and then comes the N st