#include <bits/stdc++.h>
using namespace std;
int n, k, t;
int h, w, r;
struct Edge {
  int h, w, r;
};
Edge graf[101];
bool mark[41];
int brdodatih = 0;
int tmax = 0;
bool heaped = false;
priority_queue<int> marr;
void recgen(int id, int tsum) {
  if (heaped && tmax < tsum) return;
  for (int i = id; i < k; i++) {
    if (!mark[graf[i].h] && !mark[graf[i].w + n]) {
      mark[graf[i].h] = true;
      mark[graf[i].w + n] = true;
      tsum += graf[i].r;
      if (!heaped || (heaped && tmax >= tsum)) {
        recgen(i + 1, tsum);
      }
      tsum -= graf[i].r;
      mark[graf[i].h] = false;
      mark[graf[i].w + n] = false;
    }
  }
  if (heaped) marr.pop();
  marr.push(tsum);
  tmax = marr.top();
  brdodatih++;
  if (brdodatih == t) {
    heaped = true;
    tmax = marr.top();
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  for (int i = 0; i < 2 * n; i++) mark[i] = false;
  for (int i = 0; i < k; i++) {
    scanf("%d%d%d", &h, &w, &r);
    graf[i].h = h - 1;
    graf[i].w = w - 1;
    graf[i].r = r;
  }
  recgen(0, 0);
  printf("%d\n", marr.top());
  return 0;
}
