#include <bits/stdc++.h>
using namespace std;
set<int> ANS;
int n, k, t, adj[100][100];
void solve(int A[], int B[], int rem, int c) {
  if (rem == 0) {
    ANS.insert(c);
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (!A[i])
      for (int j = 1; j <= n; j++) {
        if (!B[j] && adj[i][j]) {
          A[i] = B[j] = 1;
          solve(A, B, rem - 1, c + adj[i][j]);
          A[i] = B[j] = 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;
  }
  int A[100] = {0}, B[100] = {0};
  for (int rem = 0; rem <= n; rem++) solve(A, B, rem, 0);
  int counter = 0;
  for (auto it : ANS) {
    counter++;
    if (counter == t) printf("%d\n", it);
  }
  return 0;
}
