
#include<iostream>
#include<queue>
using namespace std;

struct Data{
  int used;
  int credit;
};

int n,U,c,k,r;
int credit[20],required[20];

int bitcount(int n){return n?(n&1)+bitcount(n>>1):0;}
int BFS(){
  bool visited[1<<20]={0};
  queue<Data>q;
  Data now={0,0};
  q.push(now);
  while(!q.empty()){
    now=q.front();
    q.pop();
    if(visited[now.used])continue;
    visited[now.used]=true;
    if(now.credit>=U)return bitcount(now.used);
    for(int i=0;i<n;i++){
      if(now.used & (1<<i) || (now.used & required[i]) != required[i])continue;
      Data next=now;
      next.used^=(1<<i);
      next.credit+=credit[i];
      q.push(next);
    }
  }
  return -1;
}

int main()
{
  while(cin>>n>>U,n|U){
    for(int i=0;i<n;i++){
      cin>>c>>k;
      credit[i]=c;
      required[i]=0;
      for(int j=0;j<k;j++){
        cin>>r;
        required[i]^=(1<<r);
      }
    }
    cout<<BFS()<<endl;
  }
}