#include<cstdio>
#include<cctype>
#include<queue>
#include<algorithm>
#include<cstring>
using namespace std;

#define REP(i, N) for(int i=0;i<(int)(N);++i)

int unit[20];
int need[20];

int nextInt() {int r = 0, ch; while( isspace(ch = getchar())); do {r = r * 10 + ch - '0';}while( isdigit( ch = getchar() ) ); return r;}

int best;
int N, U;
int tno;
int visited[1 << 20];
void dfs(int mask, int one, int have) {
  if( best <= one ) return;
  if( have >= U ) {
    best = one;
    return;
  }
  for(int i = 0; i < N; i++)
    if ( visited[mask | (1 << i)] != tno && (mask | need[i]) == mask )
      {
        visited[mask | (1 << i)] = tno;
        dfs( mask | (1 << i), one + 1, have + unit[i] );
      }
}

int main() {
  for(tno = 1;; tno++) {
    N = nextInt();
    U = nextInt();
    if( N == 0 && U == 0 ) break;
    REP(i, N) need[i] = 0;

    int all = 0;
    REP(i, N) {
      unit[i] = nextInt();
      all += unit[i];
      int K = nextInt();
      REP(k, K) {
        int x = nextInt();
        need[i] |= (1 << x);
      }
    }
    if( all == U ) {
      printf("%d\n", N);
      continue;
    }
    best = N;
    dfs(0, 0, 0);
    printf("%d\n", best);
  }
}