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_{i} items. Currently the auction price of the j-th object of the i-th seller is s_{ij}. 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.


-----Input-----

The first line contains two space-separated integers n, v (1 ≤ n ≤ 50; 10^4 ≤ v ≤ 10^6) — the number of sellers and the units of money the Valera has.

Then n lines follow. The i-th line first contains integer k_{i} (1 ≤ k_{i} ≤ 50) the number of items of the i-th seller. Then go k_{i} space-separated integers s_{i}1, s_{i}2, ..., s_{ik}_{i} (10^4 ≤ s_{ij} ≤ 10^6) — the current prices of the items of the i-th seller. 


-----Output-----

In the first line, print integer p — the number of sellers with who Valera can make a deal.

In the second line print p space-separated integers q_1, q_2, ..., q_{p} (1 ≤ q_{i} ≤ n) — the numbers of the sellers with who Valera can make a deal. Print the numbers of the sellers in the increasing order. 


-----Examples-----
Input
3 50000
1 40000
2 20000 60000
3 10000 70000 190000

Output
3
1 2 3

Input
3 50000
1 50000
3 100000 120000 110000
3 120000 110000 120000

Output
0




-----Note-----

In the first sample Valera can bargain with each of the sellers. He can outbid the following items: a 40000 item from the first seller, a 20000 item from the second seller, and a 10000 item from the third seller.

In the second sample Valera can not make a deal with any of the sellers, as the prices of all items in the auction too big for him.

Difficulty: interview

Starter code:

Solutions:
n, v = map(int, input().split())
ans = []
for i in range(n):
    a = list(map(int, input().split()))[1:]
    if v > min(a):
        ans.append(i + 1)
print(len(ans))
print(*ans)

n,m=map(int,input().split())
s=0
q=[]
for i in range(n):
    a=list(map(int,input().split()))
    for j in range(1,a[0]+1):
        if m>a[j]:
            s+=1
            q.append(i+1)
            break
print(s)
print(*q)

n, v = [int(i) for i in input().split()]
s = []
for i in range(n):
    s.append([min([int(i) for i in input().split()][1:]), i])
a = []
s.sort()
for i in range(len(s)):
    if v > s[i][0]:
        a.append(s[i][1])
print(len(a))
a.sort()
print(" ".join([str(i + 1) for i in a]))

n, v = list(map(int, input().split()))
res = []
for i in range(n):
    k, *s = list(map(int, input().split()))
    if v > min(s):
        res.append(i+1)
print(len(res))
print(' '.join(map(str, res)))


"""
Codeforces Round 252 Div 2 Problem A

Author  : chaotic_iak
Language: Python 3.3.4
"""

def read(mode=2):
    # 0: String
    # 1: List of strings
    # 2: List of integers
    inputs = input().strip()
    if mode == 0:
        return inputs
    if mode == 1:
        return inputs.split()
    if mode == 2:
        return [int(x) for x in inputs.split()]

def write(s="\n"):
    if isinstance(s, list): s = " ".join(map(str,s))
    s = str(s)
    print(s, end="")

################################################### SOLUTION
k,v = read()
res = []
for i in range(k):
    a = read()
    n = a.pop(0)
    if min(a) < v: res.append(i+1)
print(len(res))
write(res)

n, v = [int(c) for c in input().split()]
res = []

for i in range(n):
    lots = [int(c) for c in input().split()]
    for j in range(1, len(lots)):
        if lots[j] < v:
            res.append(i + 1)
            break

print(len(res))

if len(res) > 0:
    print(' '.join(map(str,res)))


n,v = [int(i) for i in input().split()]
yes = []
for i in range(n):
    l = [int(i) for i in input().split()]
    for j in l[1:]:
        if v > j:
            yes += [i+1]
            break

print(len(yes))
for i in yes:
    print(i,end = ' ')


sa=input().split(' ')
sellers=int(sa[0])
money=int(sa[1])
sa3=[]
c=0
slist=[]
for x in range(sellers):
    sa3=[]
    sa2=input().split(' ')
    for element in sa2:
        sa3.append(int(element))
    sa3.remove(sa3[0])
    mini=min(sa3)
    if money>mini:
        c+=1
        slist.append(x+1)

string=''
for element in slist:
    string+=str(element)
    string+=' '
print(c)
print(string.strip())


n,v=map(int,input().split())
qlist=[]
slist=[]
for i in range(n):
    slist.append(min([int(x) for x in input().split()][1:]))

for i in range(n):
    if slist[i]<v:
        qlist.append(i+1)

print(len(qlist))
print(''.join([str(qlist[i])+' ' for i in range(len(qlist))]))

n, v = map(int, input().split())
p = 0
q = []
for i in range(n):
    k = list(map(int, input().split()))
    km = min(k[1:])
    if km < v:
        p += 1
        q.append(i+1)

print(p)
for x in q:
    print(x, end=' ')



from collections import OrderedDict
n, v = map(int, input().split())

pr = {}

for i in range(n):
    t = list(map(int, input().split()))[1:]
    pr[i+1]=min(t)

pr = OrderedDict(sorted(pr.items(), key=lambda x: x[1]))

k = 0

rr = []

for i in pr:
    if pr[i] < v:
        k += 1
        rr.append(i)

print(k)

rr.sort()

print(*rr, sep=' ')


from sys import stdin

def solve(n, v, k):
	result = []
	for i in range(0, len(k)):
		if v > min(k[i]):
			result.append(i + 1)
	return result


def __starting_point():
	s = stdin.readline().split(' ')
	n = int(s[0])
	v = int(s[1])
	k = []
	for i in range(0, n):
		sn = stdin.readline().split(' ')[1:]
		ki = [int(kij) for kij in sn]
		k.append(ki)
	solution = solve(n, v, k)
	l = len(solution)
	print(l)
	if l > 0:
		print(' '.join([str(x) for x in solution]))

__starting_point()

from sys import stdin as cin
from fractions import Fraction as f
import math

n,v = map(int,cin.readline().split())
r=[]
for t in range(n):
    
    a=list(map(int,cin.readline().split()))

    for i in range(1,a[0]+1):
        if a[i]<v:
            r.append(t+1)
            break
print(len(r))
for x in r:
    print(x,end=' ')





n,v = list(map(int,input().split()))
sellers = []
for i in range(n):
    auctions = list(map(int,input().split()))
    k = auctions[0]
    for j in range(k):
        if(v > auctions[1+j]):
            sellers.append(str(i+1))
            break
print(len(sellers))
print(' '.join(sellers))


n,v=map(int,input().split())
l1=[]
count=0
for i in range(n):
    l=list(map(int,input().split()))
    for j in range(1,l[0]+1):
        if(v>l[j]):
            count=count+1
            l1.append(i+1)
            break
print(count)
l1.sort()
for k in range(len(l1)):
    if(len(l1)==0):
        print("\t")
    else:
        print(l1[k],"" ,end='')

from sys import stdin

def main():
    '''
    Name KevinSS
    Code: A. Valera and Antique Items
    '''
    inp = stdin
    n, v = list(map(int, inp.readline().strip().split()))
    dicti = dict()
    sellers = list()
    
    for i in range(1,n+1):
        a = str(i)
        Items = [int(x) for x in inp.readline().strip().split()]
        dicti[a] = Items
    
    for i in range(1,n+1):
        flag = False
        for j in range(1,len(dicti[str(i)])):
            if (dicti[str(i)][j] < v) and flag == False:
                sellers.append(str(i))
                flag = True
    print(len(sellers))
    print(' '.join(sellers))

                

    
main()


n,v=map(int,input().split())
sumi = 0
ls=[]
for i in range(n):
	li=list(map(int,input().split()))
	for j in range(1,len(li)):
		if(v > li[j]):
			sumi =sumi + 1
			ls.append(i+1)
			break
print(sumi)
if(sumi!=0):
	print(' '.join(map(str, ls))) 

n, v = map(int, input().split())

wins = set()
for i in range(n):
	s = list(map(int, input().split()))
	k = s[0]
	for j in range(1, k + 1):
		if s[j] < v:
			wins.add(i + 1)
			break

print(len(wins))
print(' '.join(map(str, sorted(wins))))

n, k = list(map(int,input().split()))
ans = []
count = 0
for i in range(n):
    a = list(map(int,input().split()))
    if min(a[1:]) < k:
        count += 1
        ans.append(i+1)
print(count)
if count > 0:
    sep = " "
    print(sep.join(list(map(str,ans))))



n, v = list(map(int, input().split()))
count = 0
res = []

def f(a):
  for k in a:
    if v > k:
      return True
  return False

for i in range(n):
  a = list(map(int, input().split(' ')))
  a.pop(0)
  if f(a):
    count += 1
    res.append(i+1)
  
print(count)
print( ' '.join(str(e) for e in res) )


n, v = list(map(int, input().split(" ")))
x = lambda k: int(k) < v 
o = []

for i in range(n):
	
	m = list(map(x, input().split(" ")[1:]))
	if any(m):
		o.append(i + 1)

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


num, limit = list(map(int, input().split()))
l = []
for i in range(num):
    li = list(map(int, input().split()))
    if limit > min(li[1:]):
        l.append(i + 1)
print(len(l))
print(' '.join(map(str, l)))


n, v = map(int, input().split())
sellers = [list(map(int, input().split())) for i in range(n)]

res_amount, res_sellers  = 0, []

for i, p in enumerate(sellers):
    if min(p[1:]) < v:
        res_amount += 1
        res_sellers.append(i+1)

print(res_amount)
print(*res_sellers)

n, v = map(int, input().split())
l = []
for cont in range(0, n):
    l.append(list(map(int, input().split()))[1:])
ris = []
for cont in range(0, len(l)):
    for pr in l[cont]:
        if v > pr:
            ris.append(str(cont+1))
            break
print(len(ris))
print(' '.join(ris))

n,v=list(map(int,input().split()))
l=[]
for i in range(n):
    l.append(list(map(int,input().split()))[1:])
ris=[]
for cont in range(len(l)):
    for i in l[cont]:
        if v > i:
            ris.append(str(cont+1))
            break
print(len(ris))
print(' '.join(ris))