#include <bits/stdc++.h>
using namespace std;
int n, k, t;
int marrige[22][22];
bool vis[22][22];
bool visw[22], vish[22];
vector<int> F;
void gao(int cnt, int sum, int kao) {
  if (cnt == kao) {
    F.push_back(sum);
    return;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (visw[i] || vish[j]) continue;
      int tmp = marrige[i][j];
      if (tmp != 0 && !vis[i][j]) {
        visw[i] = true;
        vish[j] = true;
        vis[i][j] = true;
        gao(cnt + 1, sum + tmp, kao);
        visw[i] = false;
        vish[j] = false;
      }
    }
  }
}
int main() {
  while (cin >> n >> k >> t) {
    F.clear();
    memset(marrige, 0, sizeof(marrige));
    int w, h, r;
    for (int i = 0; i < k; i++) {
      scanf("%d %d %d", &w, &h, &r);
      marrige[w][h] = r;
    }
    F.push_back(0);
    for (int i = 1; i <= n; i++) {
      memset(vis, false, sizeof(vis));
      gao(0, 0, i);
    }
    sort(F.begin(), F.end());
    cout << F[t - 1] << endl;
  }
  return 0;
}
