#include <bits/stdc++.h>
using namespace std;
const long long N = 105, M = 502, INF = 1000 * 1000 * 1000 + 7;
const double eps = 1e-9;
const double pi = 3.1415926535897932384626433832795;
int p[N][N];
int main() {
  int n, k, t;
  cin >> n >> k >> t;
  for (int i = 0; i < k; ++i) {
    int t, b, l;
    cin >> t >> b >> l;
    p[t - 1][b - 1] = l;
  }
  vector<int> girl(n);
  t--;
  if (!t) {
    cout << 0;
    return 0;
  }
  vector<int> ans;
  set<vector<pair<int, int>>> us;
  for (int mask = 1; mask <= (1 << n) - 1; ++mask) {
    for (int i = 0; i < n; ++i) girl[i] = i;
    do {
      int tmp = 0;
      vector<pair<int, int>> edges;
      for (int i = 0; i < n; ++i) {
        if ((mask & (1 << i)) && p[i][girl[i]]) {
          edges.push_back(make_pair(i, girl[i]));
          tmp += p[i][girl[i]];
        }
      }
      sort(edges.begin(), edges.end());
      if (!us.count(edges) && edges.size()) {
        ans.push_back(tmp);
        us.insert(edges);
      }
    } while (next_permutation(girl.begin(), girl.end()));
  }
  sort(ans.begin(), ans.end());
  cout << ans[t - 1];
  return 0;
}
