#include <bits/stdc++.h>
using namespace std;
long n, m, k;
vector<vector<pair<long, long> > > g;
vector<long long> ans;
vector<long> p;
void f(long ps = 0, long long sm = 0) {
  long i;
  if (ps == n) {
    ans.push_back(sm);
    return;
  }
  f(ps + 1, sm);
  for (i = 0; i < g[ps].size(); i++) {
    if (p[g[ps][i].first] == -1) {
      long x = g[ps][i].first;
      p[x] = ps;
      sm += g[ps][i].second;
      f(ps + 1, sm);
      p[x] = -1;
      sm -= g[ps][i].second;
    }
  }
}
int main() {
  cin >> n >> m >> k;
  long i, j, a, b, c;
  g.assign(n, vector<pair<long, long> >());
  p.assign(n, -1);
  for (i = 0; i < m; i++) {
    cin >> a >> b >> c;
    a--;
    b--;
    g[a].push_back(make_pair(b, c));
  }
  f();
  sort(ans.begin(), ans.end());
  cout << ans[k - 1] << endl;
  return 0;
}
