#include <bits/stdc++.h>
using namespace std;
int n, m;
int L[(110 * 110)], R[(110 * 110)], U[(110 * 110)], D[(110 * 110)], cnt;
int row[(110 * 110)], col[(110 * 110)];
int N[110], use[110], head[110];
int monitor[110];
int B;
void init() {
  memset(head, -1, sizeof(head));
  memset(N, 0, sizeof(N));
  for (int i = 0; i <= m; ++i) {
    L[i] = i - 1, R[i] = i + 1;
    U[i] = D[i] = i;
    row[i] = 0, col[i] = i;
  }
  L[0] = m, R[m] = 0;
  cnt = m;
}
void remove(int x) {
  for (int i = D[x]; i != x; i = D[i]) L[R[i]] = L[i], R[L[i]] = R[i];
}
void resume(int x) {
  for (int i = D[x]; i != x; i = D[i]) L[R[i]] = R[L[i]] = i;
}
int low() {
  int mi = 110, idx = 0;
  for (int i = R[0]; i; i = R[i])
    if (N[i] < mi) mi = N[i], idx = i;
  return idx;
}
void link(int r, int c) {
  ++N[c], ++cnt;
  row[cnt] = r, col[cnt] = c;
  U[cnt] = U[c], D[cnt] = c;
  U[D[cnt]] = D[U[cnt]] = cnt;
  if (head[r] == -1)
    head[r] = L[cnt] = R[cnt] = cnt;
  else {
    L[cnt] = L[head[r]];
    R[cnt] = head[r];
    L[R[cnt]] = R[L[cnt]] = cnt;
  }
}
int cost[110];
long long best;
int micost[110];
long long cost2() {
  long long ret = 0;
  bool del[(110 * 110)];
  memset(del, false, sizeof(del));
  for (int c = R[0]; c; c = R[c]) {
    if (!del[c]) {
      del[c] = true;
      ret += micost[c];
      for (int i = D[c]; i != c; i = D[i])
        for (int j = R[i]; j != i; j = R[j]) del[col[j]] = true;
    }
  }
  return ret;
}
void dance(int dep, long long val, int mak) {
  if (R[0] == 0) {
    best = min(best, val + (long long)mak * B);
    return;
  }
  int c = low();
  if (c == 0 || val + (long long)mak * B >= best) return;
  if (val + (long long)mak * B + cost2() >= best) return;
  for (int i = D[c]; i != c; i = D[i]) {
    use[dep] = i;
    remove(i);
    for (int j = R[i]; j != i; j = R[j]) remove(j);
    dance(dep + 1, val + cost[row[i]], max(mak, monitor[row[i]]));
    for (int j = L[i]; j != i; j = L[j]) resume(j);
    resume(i);
  }
}
int main() {
  while (~scanf("%d%d%d", &n, &m, &B)) {
    init();
    memset(micost, 0x3f, sizeof(micost));
    best = 0;
    int mam = 0;
    for (int i = 1; i <= n; ++i) {
      int tmp, tmp2;
      scanf("%d%d%d", cost + i, monitor + i, &tmp);
      best += cost[i];
      mam = max(mam, monitor[i]);
      for (int j = 0; j < tmp; ++j) {
        scanf("%d", &tmp2);
        link(i, tmp2);
        micost[tmp2] = min(micost[tmp2], cost[i]);
      }
    }
    best += (long long)mam * B;
    for (int i = 1; i <= m; ++i)
      if (!N[i]) {
        N[1] = 0;
        break;
      }
    if (!N[1]) {
      puts("-1");
      continue;
    }
    dance(0, 0, 0);
    printf("%I64d\n", best);
  }
  return 0;
}
void data() {
  freopen("in.txt", "w", stdout);
  puts("20 100");
  for (int i = 0; i < 100; ++i) printf("%d %d %d\n", 998, 1, i % 20 + 1);
}
