There is a number T shows there are T test cases below. ($T \leq 20$)
For each test case , the first line contains two integers, n and k, which means the number of class and the IQ of Dudu. n ( $0 \leq n \leq 1000$ ), k( $0 \leq k < 2^{31}$ ).
Then, there are n classes below, for each class, the first line contains an integer m, which means the number of the classmates in this class, and for next m lines, each line contains an integer v[i], which means there is a person whose iq is v[i] in this class. m( $0 \leq m \leq 100$ ), v[i]( $0 \leq v[i] < 2^{31}$ )