#include <bits/stdc++.h>
using namespace std;
int n, m, t, i, j, a[20][20], sum[1048577], lg[1048577];
vector<pair<int, int> > f, g;
bool cmp(pair<int, int> x, pair<int, int> y) { return x.second < y.second; }
inline int lowbit(int x) { return x & (-x); }
int main() {
  for ((i) = 0; (i) <= (20); (i)++) lg[1 << i] = i;
  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_back(make_pair(0, 0));
  for ((i) = 0; (i) < (n); (i)++) {
    g.clear();
    int all = 0;
    for ((j) = 0; (j) < (n); (j)++)
      if (a[i][j]) all |= (1 << j);
    for (__typeof((f).begin()) it = (f).begin(); it != (f).end(); it++) {
      g.push_back(*it);
      int k;
      for (k = (all & ((1 << n) - 1 - it->first)); k; k -= lowbit(k)) {
        j = lg[lowbit(k)];
        if (a[i][j]) {
          g.push_back(make_pair((it->first | (1 << j)), it->second + a[i][j]));
        }
      }
    }
    sort(g.begin(), g.end(), cmp);
    while (g.size() > t) g.pop_back();
    f = g;
  }
  sort(g.begin(), g.end(), cmp);
  cout << g[t - 1].second << endl;
  return 0;
}
