#include <bits/stdc++.h>
using namespace std;
bool F_WOMAN[22];
bool F_MAN[22];
std::vector<int> results(1, 0);
std::vector<int> mans;
map<int, vector<pair<int, int> > > contract;
void f(int k, int num_edg, int& res_edg, int cur_price) {
  int num_woman = contract[mans[k]].size();
  for (int i = 0; i < num_woman; i++) {
    if (F_WOMAN[contract[mans[k]][i].first]) {
      F_WOMAN[contract[mans[k]][i].first] = false;
      num_edg++;
      cur_price += contract[mans[k]][i].second;
      if (num_edg == res_edg) {
        results.push_back(cur_price);
        F_WOMAN[contract[mans[k]][i].first] = true;
      } else if (num_edg > res_edg)
        return;
      else {
        f(k + 1, num_edg, res_edg, cur_price);
        F_WOMAN[contract[mans[k]][i].first] = true;
      }
      F_WOMAN[contract[mans[k]][i].first] = true;
      num_edg--;
      cur_price -= contract[mans[k]][i].second;
    }
  }
}
int main() {
  for (int i = 0; i < 22; i++) {
    F_WOMAN[i] = true;
    F_MAN[i] = false;
  }
  int n, k, t;
  cin >> n >> k >> t;
  for (int i = 0; i < k; i++) {
    int h, w, r;
    cin >> h >> w >> r;
    contract[h].push_back(make_pair(w, r));
    if (!F_MAN[h]) {
      F_MAN[h] = true;
      mans.push_back(h);
    }
  }
  for (int i = 1; i <= k; i++) {
    int num_edg = 0, k = 0, cur_price = 0;
    for (k = 0; k < mans.size(); k++) f(k, num_edg, i, cur_price);
  }
  sort(results.begin(), results.end());
  cout << results[t - 1];
}
