#include <bits/stdc++.h>
using namespace std;
static const int INF = 500000000;
template <class T>
void debug(T a, T b) {
  for (; a != b; ++a) cerr << *a << ' ';
  cerr << endl;
}
int n, k, t;
vector<pair<int, int> > g[25];
int used[25];
int lim, cnt;
bool dfs(int v, int sum) {
  ++cnt;
  if (cnt == t) return true;
  if (v == n) return false;
  for (int i = 0; i < g[v].size(); ++i) {
    pair<int, int>& e = g[v][i];
    if (used[e.first] || sum + e.second >= lim) continue;
    used[e.first] = 1;
    if (dfs(v + 1, sum + e.second)) return true;
    used[e.first] = 0;
  }
  --cnt;
  if (dfs(v + 1, sum)) return true;
  return false;
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  for (int i = 0; i < k; ++i) {
    int a, b, r;
    scanf("%d%d%d", &a, &b, &r);
    --a;
    --b;
    g[a].push_back(make_pair(b, r));
  }
  int lb = 0, ub = 1000 * 20 + 5;
  while (ub - lb > 1) {
    int md = (ub + lb) >> 1;
    lim = md;
    cnt = 0;
    memset(used, 0, sizeof(used));
    if (dfs(0, 0))
      ub = md;
    else
      lb = md;
  }
  printf("%d\n", lb);
  return 0;
}
