#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
const int N = 20;
int n, k, t;
int16_t a[N + 1][N + 1], b[N + 1];
bool v[N + 1];
vector<int16_t> r;
void run(int i) {
  if (i > n) {
    int rr = 0;
    for (int j = 1; j <= n; j++) rr += a[j][b[j]];
    r.push_back(rr);
  } else {
    for (int j = 0; j <= n; j++) {
      if (j == 0 || !v[j]) {
        b[i] = j;
        v[j] = true;
        run(i + 1);
        v[j] = false;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout << fixed;
  cin >> n >> k >> t;
  for (int i = 0; i < k; i++) {
    int h, w, r;
    cin >> h >> w >> r;
    a[h][w] = r;
  }
  run(1);
  sort(r.begin(), r.end());
  cout << r[t - 1] << endl;
  return 0;
}
