#include <bits/stdc++.h>
using namespace std;
int r[5][5];
int main() {
  int n, k, t;
  scanf("%d %d %d", &n, &k, &t);
  memset(r, -1, sizeof r);
  while (k--) {
    int u, v, c;
    scanf("%d %d %d", &u, &v, &c);
    r[u - 1][v - 1] = c;
  }
  vector<int> all(n + n, -1);
  map<vector<int>, int> valid;
  for (int i = 0; i < n; ++i) {
    all[i + n] = i;
  }
  do {
    bool ok = true;
    for (int i = 0; i < n; ++i) {
      ok &= all[i] == -1 || r[i][all[i]] != -1;
    }
    if (!ok) continue;
    int sum = 0;
    for (int i = 0; i < n; ++i) {
      if (all[i] != -1) {
        sum += r[i][all[i]];
      }
    }
    valid[vector<int>(all.begin(), all.begin() + n)] = sum;
  } while (next_permutation(all.begin(), all.end()));
  vector<int> total;
  for (auto item : valid) {
    total.push_back(item.second);
  }
  sort(total.begin(), total.end());
  printf("%d\n", total[t - 1]);
  return 0;
}
