#include <bits/stdc++.h>
using namespace std;
int n, k, t, s[40000000], m[25], f[25], kk, mark[30];
struct pp {
  int h, w, r;
} a[105];
void ff(int x) {
  if (x > k) {
    int sum = 0;
    for (int i = 1; i <= k; i++) {
      sum += (a[i].r * mark[i]);
    }
    s[++kk] = sum;
    return;
  }
  if (m[a[x].h] && f[a[x].w]) {
    m[a[x].h] = f[a[x].w] = 0;
    mark[x] = 1;
    ff(x + 1);
    m[a[x].h] = f[a[x].w] = 1;
  }
  mark[x] = 0;
  ff(x + 1);
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  for (int i = 1; i <= k; i++) {
    scanf("%d%d%d", &a[i].h, &a[i].w, &a[i].r);
  }
  for (int i = 1; i <= n; i++) m[i] = f[i] = 1;
  for (int i = 1; i <= k; i++) mark[i] = 0;
  kk = 0;
  ff(1);
  sort(s + 1, s + kk + 1);
  printf("%d\n", s[t]);
  return 0;
}
