#include <bits/stdc++.h>
using namespace std;
vector<int> arr;
vector<vector<pair<int, int> > > pr;
vector<bool> fl;
int n, k, t;
void work(int p, int sum) {
  if (p == n) {
    arr.push_back(sum);
    return;
  }
  for (int i = 0; i < pr[p].size(); i++)
    if (!fl[pr[p][i].first]) {
      fl[pr[p][i].first] = 1;
      work(p + 1, sum + pr[p][i].second);
      fl[pr[p][i].first] = 0;
    }
  work(p + 1, sum);
}
int main() {
  cin >> n >> k >> t;
  fl.resize(n);
  pr.resize(n);
  int p, q, r;
  for (int i = 0; i < k; i++) {
    cin >> p >> q >> r;
    p--;
    q--;
    pr[p].push_back(make_pair(q, r));
  }
  work(0, 0);
  t--;
  sort(arr.begin(), arr.end());
  cout << arr[t];
}
