#include <bits/stdc++.h>
using namespace std;
const int SIZE = 25, MSIZE = 30000;
int A[SIZE][SIZE], R[MSIZE], N;
bool W[SIZE];
void f(int a, int r) {
  if (a == N) {
    R[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;
    }
}
void g(int a, int r) {
  if (a == N) {
    R[r]++;
    return;
  }
  f(a + 1, r);
  for (int b = 0; b != N; b++)
    if (!W[b] && A[b][a]) {
      W[b] = true;
      f(a + 1, r + A[b][a]);
      W[b] = false;
    }
}
int main() {
  int K, t, a, b, c;
  cin >> N >> K >> t;
  t--;
  while (K--) {
    cin >> a >> b >> c;
    a--, b--;
    A[a][b] = c;
  }
  g(0, 0);
  for (int i = 0; i != MSIZE; i++)
    while (R[i]) {
      if (!t) {
        cout << i;
        return 0;
      }
      R[i]--;
      t--;
    }
  return 0;
}
