#include <stdio.h>

int main(void) {
	int n, U;
	while (scanf("%d%d", &n, &U) == 2 && (n > 0 || U > 0)) {
		int c[20];
		int k[20];
		int r[20][5];
		int zyouken[20] = {0};
		int i, j;
		int tani, kamokusuu;
		int answer = n + 1;
		int search, search_max;
		for (i = 0; i < n; i++) {
			if (scanf("%d%d", &c[i], &k[i]) != 2) return 1;
			for (j = 0; j < k[i]; j++) {
				if (scanf("%d", &r[i][j]) != 1) return 1;
				zyouken[i] |= 1 << r[i][j];
			}
		}
		search_max = 1 << n;
		for (search = 0; search < search_max; search++) {
			tani = 0;
			kamokusuu = 0;
			for (i = 0; i < n; i++) {
				if ((search >> i) & 1) {
					if ((search & zyouken[i]) != zyouken[i]) break;
					tani += c[i];
					kamokusuu++;
				}
			}
			if (i >= n && tani >= U) {
				if (kamokusuu < answer) answer = kamokusuu;
			}
		}
		printf("%d\n", answer);
	}
	return 0;
}