#include <bits/stdc++.h>
using namespace std;
struct triple {
  int mask1, mask2, d, i;
};
struct compare {
  bool operator()(triple a, triple b) { return a.d > b.d; }
};
int main() {
  int n, k, t;
  cin >> n >> k >> t;
  vector<pair<pair<int, int>, int>> v(k);
  for (int i = 0; i < k; i++) {
    cin >> v[i].first.first >> v[i].first.second >> v[i].second;
  }
  priority_queue<triple, vector<triple>, compare> pq;
  pq.push({0, 0, 0, -1});
  while (!pq.empty()) {
    triple cur = pq.top();
    pq.pop();
    t--;
    if (t == 0) {
      cout << cur.d;
      break;
    }
    for (int i = cur.i + 1; i < k; i++) {
      triple temp = cur;
      int m = v[i].first.first, w = v[i].first.second;
      if ((cur.mask1 & (1 << m)) || (cur.mask2 & (1 << w))) continue;
      pq.push(
          {cur.mask1 | (1 << m), cur.mask2 | (1 << w), cur.d + v[i].second, i});
    }
  }
  return 0;
}
