#include <bits/stdc++.h>
using namespace std;
template <class T>
struct triple {
  T first;
  T second;
  T third;
};
vector<int> result(vector<triple<int> >& arg, vector<pair<bool, bool> > colour,
                   int i) {
  vector<int> res, temp;
  colour[arg[i].first].first = true;
  colour[arg[i].second].second = true;
  res.push_back(arg[i].third);
  for (int j = i + 1; j < arg.size(); ++j) {
    if (!colour[arg[j].first].first && !colour[arg[j].second].second) {
      colour[arg[j].first].first = true;
      colour[arg[j].second].second = true;
      temp = result(arg, colour, j);
      colour[arg[j].first].first = false;
      colour[arg[j].second].second = false;
      for (int k = 0; k < temp.size(); ++k) {
        res.push_back(temp[k] + arg[i].third);
      }
    }
  }
  return res;
}
int compare(const void* lhs, const void* rhs) {
  return *(const int*)lhs - *(const int*)rhs;
}
int main() {
  int n, k, t;
  cin >> n >> k >> t;
  vector<triple<int> > arr(k);
  vector<int> sum, temp;
  for (int i = 0; i < k; ++i) {
    cin >> arr[i].first >> arr[i].second >> arr[i].third;
  }
  sum.push_back(0);
  for (int i = 0; i < k; ++i) {
    vector<pair<bool, bool> > colour(k, pair<bool, bool>(false, false));
    temp = result(arr, colour, i);
    sum.insert(sum.end(), temp.begin(), temp.end());
  }
  qsort(&sum[0], sum.size(), sizeof(int), compare);
  cout << sum[t - 1];
  return 0;
}
