#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b % 2 != 0) {
      ans = (ans * a) % 1000000007;
    }
    a = ((a % 1000000007) * (a % 1000000007)) % 1000000007;
    b >>= 1;
  }
  return ans;
}
void dfs(int i, int n, int val, vector<pair<int, int> > ha[], vector<int>& v,
         set<int>& avail) {
  if (i > n) {
    v.push_back(val);
    return;
  }
  dfs(i + 1, n, val, ha, v, avail);
  for (int j = 0; j < ha[i].size(); j++) {
    if (avail.count(ha[i][j].first)) {
      avail.erase(ha[i][j].first);
      dfs(i + 1, n, val + ha[i][j].second, ha, v, avail);
      avail.insert(ha[i][j].first);
    }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int ta = 1;
  while (ta--) {
    int n, k, t;
    cin >> n >> k >> t;
    vector<pair<int, int> > v[n + 1];
    for (int i = 0; i < k; i++) {
      int p, q, r;
      cin >> p >> q >> r;
      v[p].push_back({q, r});
    }
    set<int> s;
    for (int i = 1; i <= n; i++) s.insert(i);
    vector<int> val;
    dfs(1, n, 0, v, val, s);
    sort(val.begin(), val.end());
    cout << val[t - 1];
  }
  return 0;
}
