#include <bits/stdc++.h>
using namespace std;
const int SIZE = 10, MSIZE = 1500;
int A[SIZE][SIZE], R[MSIZE], pR, N;
bool W[SIZE];
void f(int a, int r) {
  if (a == N) {
    R[pR++] = r;
    return;
  }
  f(a + 1, r);
  for (int b = 0; b != N; b++)
    if (!W[b] && A[a][b]) {
      W[b] = true;
      f(a + 1, r + A[a][b]);
      W[b] = false;
    }
}
int vs(const void *a, const void *b) {
  if (*(int *)a == *(int *)b)
    return 0;
  else if (*(int *)a > *(int *)b)
    return 1;
  else
    return -1;
}
int main() {
  int K, t, a, b, c;
  cin >> N >> K >> t;
  while (K--) {
    cin >> a >> b >> c;
    a--, b--;
    A[a][b] = c;
  }
  f(0, 0);
  qsort(R, pR, sizeof(int), vs);
  cout << R[t - 1];
  return 0;
}
