#include <bits/stdc++.h>
using namespace std;
struct rec {
  long long co, val, d;
} E[3000005];
bool cmp(const rec &i, const rec &j) { return i.val < j.val; }
long long sum, now, pre, n, m;
long long dp[2][3000005], cost, res, ans;
int main() {
  scanf("%I64d%I64d%I64d", &n, &m, &cost);
  for (long long i = 1; i <= n; i++) {
    long long x, y;
    scanf("%I64d%I64d%I64d", &E[i].co, &E[i].val, &x);
    for (long long j = 1; j <= x; j++) {
      scanf("%I64d", &y);
      E[i].d |= 1 << y - 1;
    }
  }
  sort(E + 1, E + 1 + n, cmp);
  sum = 1;
  for (long long i = 1; i <= m; i++) sum <<= 1;
  sum--;
  for (long long i = 0; i <= sum; i++) dp[now][i] = 2000000000000000000LL;
  dp[now][sum] = 0;
  ans = 2000000000000000000LL;
  for (long long k = 1; k <= n; k++) {
    res += cost * (E[k].val - E[k - 1].val);
    pre = now;
    now ^= 1;
    for (long long i = 0; i <= sum; i++) dp[now][i] = dp[pre][i];
    for (long long i = 0; i <= sum; i++) {
      long long x = i - (i & E[k].d);
      dp[now][x] = min(dp[now][x], dp[pre][i] + E[k].co);
    }
    ans = min(ans, dp[now][0] + res);
  }
  if (ans == 2000000000000000000LL) ans = -1;
  printf("%I64d\n", ans);
}
