#include <bits/stdc++.h>
using namespace std;
int n, m, t, i, j, a[20][20];
priority_queue<pair<int, int> > f, g;
int main() {
  scanf("%d%d%d", &n, &m, &t);
  for ((i) = 0; (i) < (m); (i)++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    a[x - 1][y - 1] = z;
  }
  f.push(make_pair(0, 0));
  for ((i) = 0; (i) < (n); (i)++) {
    priority_queue<pair<int, int> > e;
    swap(e, g);
    while (!f.empty()) {
      pair<int, int> it = f.top();
      f.pop();
      if (g.size() >= t && it.first >= g.top().first) continue;
      g.push(it);
      for ((j) = 0; (j) < (n); (j)++) {
        if (!((it.second >> j) & 1) && a[i][j]) {
          g.push(make_pair(it.first + a[i][j], (it.first | (1 << j))));
        }
      }
      while (g.size() > t) g.pop();
    }
    f = g;
  }
  cout << g.top().first << endl;
  return 0;
}
