#include <queue>
#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;

struct NODE{
	int a,b,c;
	NODE(int x,int y,int z){ a = x , b = y , c = z;}
};

#define INF (1<<21)
int n,U , unit[20];
char done[1<<20];
int main(){
	while(cin >> n >> U , n){
		
		int graph[21] = {0};
		memset(done,0,sizeof(done));
		for(int i = 0 ; i < n ; i++){
			int k;
			cin >> unit[i] >> k;
			for(int j = 0 ; j < k ; j++){
				int a; cin >> a;
				graph[i] |= (1<<a);
			}
		}
		queue<NODE> Q;
		Q.push(NODE(0,0,0));
		done[0] = 1;
		while(Q.size()){
			NODE q = Q.front(); Q.pop();
			if(q.b >= U){cout << q.c << endl; break;} 
			for(int i = 0 ; i < n ; i++){
				if( !(q.a >> i & 1) && (q.a & graph[i]) == graph[i])
					if(!done[q.a | (1<<i)])Q.push(NODE( q.a | (1<<i) , q.b + unit[i] , q.c+1)) , done[q.a|(1<<i)] = true;
			}
		}
		
	}
}