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.
inp1 = str(input())
l1 = inp1.split()
n_sell = int(l1[0])
money = int(l1[1])

deals = 0
sellers = []
for i in range(1, n_sell+1):
    inp2 = str(input())
    l2 = inp2.split()
    n = len(l2)
    for j in range(1, n):
        if money > int(l2[j]):
            deals +=1
            
            sellers.append(int(l2[0]))
            break

print(deals)
sellers.sort()

for i in sellers:
    print(i, end=" ")

'''
2 100000
21 109009 794511 493181 933159 164909 740855 910537 441215 115080 187796 959540 654064 637796 345332 283674 414115 812137 189697 334181 760049 362310
41 167496 737214 728717 810804 552737 345997 853358 671921 328051 335540 892834 811545 238111 573410 299044 814724 32971 116212 407295 438102 373435 998316 239070 201923 254817 572639 690903 274372 825464 799636 234596 867680 621458 929691 875497 281974 630130 394504 638790 765873 265802
'''
