#include <bits/stdc++.h>
using namespace std;
struct st {
  int h;
  int w;
  int r;
};
vector<vector<int> > mt;
vector<long long> res;
int n;
void gomask(int nn, long long pred, long long sum) {
  if (nn == 0) {
    for (int i = n, p = 1; i >= 0; --i, p <<= 1) {
      if ((p == 1) || ((pred & p) == 0)) {
        res.push_back(sum + mt[nn][i]);
      }
    }
  } else {
    for (int i = n, p = 1; i >= 0; --i, p <<= 1) {
      if ((p == 1) || ((pred & p) == 0)) {
        gomask(nn - 1, (pred | p), sum + mt[nn][i]);
      }
    }
  }
}
int main() {
  int k, t;
  cin >> n >> k >> t;
  vector<st> v(k);
  for (int i = 0; i < n; ++i) {
    vector<int> tmp(n + 1);
    mt.push_back(tmp);
  }
  vector<long long> vsum;
  for (int i = 0; i < k; ++i) {
    st tmp;
    cin >> tmp.h >> tmp.w >> tmp.r;
    mt[tmp.h - 1][tmp.w - 1] = tmp.r;
    v[i] = tmp;
  }
  gomask(n - 1, 1, 0);
  sort(res.begin(), res.end());
  cout << res[t - 1] << endl;
  return 0;
}
