#include <bits/stdc++.h>
using namespace std;
void solve(int man, int prev_sum, int n, int a[20][20], multiset<int> &p,
           multiset<int> &women) {
  if (man == n + 1) {
    p.insert(prev_sum);
    p.erase(--p.end());
  } else {
    solve(man + 1, prev_sum, n, a, p, women);
    for (int i = 0; i < n; ++i) {
      if (a[man][i] != 0 && prev_sum + a[man][i] < *(--p.end()) &&
          women.find(i) == women.end()) {
        women.insert(i);
        solve(man + 1, prev_sum + a[man][i], n, a, p, women);
        women.erase(i);
      }
    }
  }
}
int main() {
  int n, k, t, h, w;
  cin >> n >> k >> t;
  int a[20][20];
  for (int i = 0; i < k; ++i) {
    cin >> h >> w;
    --h;
    --w;
    cin >> a[h][w];
  }
  multiset<int> p, women;
  for (int i = 0; i < t; ++i) {
    p.insert(INT_MAX);
  }
  solve(0, 0, n, a, p, women);
  cout << *(--p.end()) << endl;
  return 0;
}
