#include <bits/stdc++.h>
using namespace std;
struct edge {
  int a, b, v;
} E[105];
int K, num[20005];
bool A[105], B[105];
void go(int x, int tv) {
  if (x == K) {
    ++num[tv];
    return;
  }
  go(x + 1, tv);
  if (A[E[x].a] || B[E[x].b]) return;
  A[E[x].a] = B[E[x].b] = 1;
  go(x + 1, tv + E[x].v);
  A[E[x].a] = B[E[x].b] = 0;
}
int main() {
  int N, T;
  scanf("%d%d%d", &N, &K, &T);
  for (int i = 0; i < K; ++i) scanf("%d%d%d", &E[i].a, &E[i].b, &E[i].v);
  go(0, 0);
  int total = 0;
  for (int i = 0; i <= N * 1000; ++i) {
    total += num[i];
    if (total >= T) {
      printf("%d\n", i);
      break;
    }
  }
}
