#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];
vector<int> marr;
void recgen(int id, int tsum) {
  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;
      recgen(i + 1, tsum);
      tsum -= graf[i].r;
      mark[graf[i].h] = false;
      mark[graf[i].w + n] = false;
    }
  }
  marr.push_back(tsum);
}
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);
  sort(marr.begin(), marr.end());
  printf("%d\n", marr[t - 1]);
  return 0;
}
