#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1e5 + 12;
const long long INF = 1e18 + 12;
const long long Inf = 1e9 + 12;
long long a[10][10], n, k, t;
vector<long long> v;
bool f[10];
void make(long long cnt, long long pos = 1, long long k = 0,
          long long val = 0) {
  if (pos == n + 1 && k == cnt) {
    v.push_back(val);
    return;
  }
  if (pos > n) return;
  make(cnt, pos + 1, k, val);
  for (long long i = 1; i <= n; i++) {
    if (a[pos][i] && !f[i] && k < cnt) {
      f[i] = true;
      make(cnt, pos + 1, k + 1, val + a[pos][i]);
      f[i] = false;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k >> t;
  for (long long i = 0; i < k; i++) {
    long long x, y, val;
    cin >> x >> y >> val;
    a[x][y] = val;
  }
  v.push_back(0);
  for (long long i = 1; i <= n; i++) make(i);
  sort(v.begin(), v.end());
  cout << v[t - 1] << endl;
}
