#include<stdio.h>
#include<bitset>
#include<map>
//BitCount
int F(int x)
{
	int r=0;
	for(; x; x&=x-1)
		++r;
	return r;
}
std::bitset<1<<20>f;
int dp[1<<20];
int main()
{
	int n,u,k,r,i,j,x,y,z;
	while(scanf("%d%d",&n,&u),n)
	{
		f.reset();
		std::pair<int,int>a[20];
		for(i=0;i<n;++i)
		{
			scanf("%d%d",&a[i].first,&k);
			if(k)
			{
				while(k--)
				{
					scanf("%d",&r);
					a[i].second|=(1<<r);
				}
			}
			else f[1<<i]=1,dp[1<<i]=a[i].first;
		}
		for(i=1;i<=n;++i)
		{
			z=(1<<i)-1;
			while(z<(1<<n))
			{
				if(f[z])
				{
					if(dp[z]>=u){printf("%d\n",F(z));goto E;}
					for(j=0;j<n;++j)
						if(!(z&(1<<j)) && (z&a[j].second)==a[j].second)
						{
							f[z|(1<<j)]=1;
							dp[z|(1<<j)]=dp[z]+a[j].first;
						}
				}
				x=z&-z;
				y=z+x;
				z=((z&~y)/x/2)|y;
			}
		}
		E:;
	}
}