n,U,c[20],R[20],ans;
S(now,sum,attend,anum){
	int i;
	if(sum>=U){
		for(i=0;i<n;i++){
			if(attend&(1<<i)){
				if((attend&R[i])!=R[i]){
					return;
				}
			}
		}
		anum<ans?ans=anum:0;
	}else if(now<n){
		S(now+1,sum,attend,anum);
		S(now+1,sum+c[now],attend|1<<now,anum+1);
	}
}
main(){
	int i,j,k,t;
	for(;scanf("%d%d",&n,&U)*n;){
		ans=n;
		for(i=0;i<n;i++){
			scanf("%d%d",c+i,&k);
			R[i]=0;
			for(;k--;){
				scanf("%d",&t);
				R[i]|=1<<t;
			}
		}
		S(0,0,0,0);
		printf("%d \n",ans);
	}
}