#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;

struct Info{
	int points;
	vector<int> next_SUBJECT;
};

struct Data{
	int sum_points,number,subj_num;
	short in_num[20];
};

int N,need_points,POW[21];
Info info[20];
int first_in_num[20];
bool LOG[1048576];

void copyData(Data& to,Data from){
	for(int i = 0; i < N; i++){
		to.in_num[i] = from.in_num[i];
	}
}

void func(){

	for(int i = 0; i < N; i++)info[i].next_SUBJECT.clear();
	for(int i = 0; i < POW[N]; i++)LOG[i] = false;

	int num,tmp;

	for(int i = 0; i < N; i++){
		scanf("%d %d",&info[i].points,&num);
		first_in_num[i] = num;

		for(int k = 0; k < num; k++){
			scanf("%d",&tmp);
			info[tmp].next_SUBJECT.push_back(i);
		}
	}

	queue<Data> Q;

	for(int i = 0; i < N; i++){
		if(first_in_num[i] == 0){
			Data new_data;
			for(int k = 0; k < N; k++)new_data.in_num[k] = first_in_num[k];
			new_data.subj_num = 1;
			new_data.sum_points = info[i].points;
			new_data.number = POW[i];
			LOG[POW[i]] = true;
			for(int k = 0; k < info[i].next_SUBJECT.size(); k++){
				new_data.in_num[info[i].next_SUBJECT[k]]--;
			}
			Q.push(new_data);
		}
	}

	while(!Q.empty()){

		if(Q.front().sum_points >= need_points){
			printf("%d\n",Q.front().subj_num);
			return;
		}else{

			for(int loop = 0; loop < N; loop++){
				if(Q.front().number & (1 << loop)){
					//Do nothing
				}else{
					if(Q.front().in_num[loop] == 0){
						Data new_data;
						copyData(new_data,Q.front());
						new_data.subj_num = Q.front().subj_num+1;
						new_data.sum_points = Q.front().sum_points+info[loop].points;
						new_data.number = Q.front().number+POW[loop];
						if(LOG[new_data.number])continue;
						LOG[new_data.number] = true;
						for(int k = 0; k < info[loop].next_SUBJECT.size(); k++){
							new_data.in_num[info[loop].next_SUBJECT[k]]--;
						}
						Q.push(new_data);
					}
				}
			}
			Q.pop();
		}
	}
}

int main(){

	for(int i = 0; i <= 20; i++)POW[i] = pow(2,i);

	while(true){
		scanf("%d %d",&N,&need_points);
		if(N == 0 && need_points == 0)break;

		func();
	}

	return 0;
}