#include <bits/stdc++.h>
using namespace std;
multiset<int> ANS;
int n, k, t, adj[100][100];
pair<int, int> E[100];
void solve(int A[], int B[], int idx, int c) {
  if (idx == k) {
    ANS.insert(c);
    return;
  }
  int x = E[idx].first, y = E[idx].second;
  if (A[x] || B[y]) {
    solve(A, B, idx + 1, c);
  } else {
    solve(A, B, idx + 1, c);
    A[x] = B[y] = 1;
    solve(A, B, idx + 1, c + adj[x][y]);
    A[x] = B[y] = 0;
  }
}
int main(void) {
  scanf("%d %d %d", &n, &k, &t);
  for (int i = 0; i < k; i++) {
    int u, v, w;
    cin >> u >> v >> w;
    adj[u][v] = w;
    E[i] = make_pair(u, v);
  }
  int A[100] = {0}, B[100] = {0};
  solve(A, B, 0, 0);
  int counter = 0;
  for (auto it : ANS) {
    counter++;
    if (counter == t) printf("%d\n", it);
  }
  return 0;
}
