#include <bits/stdc++.h>
using namespace std;
int n, k, t, L[200], R[200], V[200], ev[1000000], it = 0;
bool usedw[30], usedm[30];
void rec(int cost, int q) {
  if (q == k + 1) {
    ev[++it] = cost;
    return;
  }
  rec(cost, q + 1);
  if (!usedw[L[q]] && !usedm[R[q]]) {
    usedw[L[q]] = true;
    usedm[R[q]] = true;
    rec(cost + V[q], q + 1);
    usedw[L[q]] = false;
    usedm[R[q]] = false;
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  for (int i = 1; i <= k; i++) scanf("%d%d%d", &L[i], &R[i], &V[i]);
  rec(0, 1);
  sort(ev + 1, ev + it + 1);
  cout << ev[t] << endl;
  return 0;
}
