#include <bits/stdc++.h>
using namespace std;
int a[30][30];
vector<int> v;
int n, t;
bool z[30];
void p(int c, int s) {
  if (c == n) {
    v.push_back(s);
    return;
  }
  p(c + 1, s);
  for (int i = 0; i < n; i++)
    if (a[c][i] != -1 && !z[i]) {
      z[i] = true;
      p(c + 1, s + a[c][i]);
      z[i] = false;
    }
}
void qSort(int low, int high) {
  int i = low;
  int j = high;
  int x = v[(low + high) / 2];
  do {
    while (v[i] < x) ++i;
    while (v[j] > x) --j;
    if (i <= j) {
      int temp = v[i];
      v[i] = v[j];
      v[j] = temp;
      i++;
      j--;
    }
  } while (i <= j);
  if (low < j && t <= j) qSort(low, j);
  if (i < high && t >= i) qSort(i, high);
}
int main() {
  int k;
  cin >> n >> k >> t;
  t--;
  for (int i = 0; i < n; i++) {
    z[i] = false;
    for (int j = 0; j < n; j++) a[i][j] = -1;
  }
  for (int i = 0; i < k; i++) {
    int q, w, e;
    cin >> q >> w >> e;
    q--;
    w--;
    a[q][w] = e;
  }
  p(0, 0);
  qSort(0, v.size() - 1);
  cout << v[t];
  return 0;
}
