Valera is a collector. Once he wanted to expand his collection with exactly one antique item.

Valera knows *n* sellers of antiques, the *i*-th of them auctioned *k*<sub class="lower-index">*i*</sub> items. Currently the auction price of the *j*-th object of the *i*-th seller is *s*<sub class="lower-index">*ij*</sub>. Valera gets on well with each of the *n* sellers. He is perfectly sure that if he outbids the current price of one of the items in the auction (in other words, offers the seller the money that is strictly greater than the current price of the item at the auction), the seller of the object will immediately sign a contract with him.

Unfortunately, Valera has only *v* units of money. Help him to determine which of the *n* sellers he can make a deal with.
The first line contains two space-separated integers *n*, *v* (1 ≤ *n* ≤ 50; 10<sup class="upper-index">4</sup> ≤ *v* ≤ 10<sup class="upper-index">6</sup>) — the number of sellers and the units of money the Valera has.

Then *n* lines follow. The *i*-th line first contains integer *k*<sub class="lower-index">*i*</sub> (1 ≤ *k*<sub class="lower-index">*i*</sub> ≤ 50) the number of items of the *i*-th seller. Then go *k*<sub class="lower-index">*i*</sub> space-separated integers *s*<sub class="lower-index">*i*1</sub>, *s*<sub class="lower-index">*i*2</sub>, ..., *s*<sub class="lower-index">*ik*<sub class="lower-index">*i*</sub></sub> (10<sup class="upper-index">4</sup> ≤ *s*<sub class="lower-index">*ij*</sub> ≤ 10<sup class="upper-index">6</sup>) — the current prices of the items of the *i*-th seller.


n,v=input().split()
n=int(n)
v=int(v)
final=[]
for i in range(n):
	l=[int(i) for i in input().split()]
	t=l.pop(0)
	#print(l,t)
	l.sort()
	p=len(l)
	count=0
	
	for i in range(p):
		if l[i]<v:
			final.append(t)
			break
			

print(len(final))
for i in final:
	print(i,end=" ")
    	 	 	  			      			 	  	