#include <bits/stdc++.h>
using namespace std;
int a[101];
int b[101];
map<pair<int, int>, int> c;
set<pair<int, int>> was;
set<vector<pair<int, int>>> r;
int main() {
  int n, k, t;
  cin >> n >> k >> t;
  for (int i = 1; i <= k; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    x--;
    y--;
    a[i] = x;
    b[i] = y;
    c[make_pair(x, y)] = z;
    was.insert(make_pair(x, y));
  }
  vector<int> kol;
  kol.push_back(0);
  for (int l = 1; l < (1 << n); l++) {
    int g[10];
    for (int j = 0; j < n; j++) g[j] = j;
    do {
      vector<pair<int, int>> now;
      int tek = 0;
      bool fl = 1;
      int p = 0;
      for (int i = 0; i < n; i++) {
        if ((l & (1 << i)) == 0) continue;
        p++;
        if (was.count(make_pair(i, g[i])) == 0) fl = 0;
        now.push_back(make_pair(i, g[i]));
        tek += c[make_pair(i, g[i])];
      }
      if (fl && p && r.count(now) == 0) {
        kol.push_back(tek);
        r.insert(now);
      }
    } while (next_permutation(g, g + n));
  }
  sort(kol.begin(), kol.end());
  cout << kol[t - 1] << endl;
  return 0;
}
