#include <bits/stdc++.h>
using namespace std;
const int MAXN = 22;
int n, m, t, col, total, cur;
int w[MAXN];
vector<int> ed[MAXN], cost[MAXN];
inline bool check(int u, int up) {
  if (++total == t) return 1;
  if (u == n) return 0;
  for (int i = 0; i < int(ed[u].size()); i++) {
    if (w[ed[u][i]] != col && cur + cost[u][i] <= up) {
      cur += cost[u][i];
      w[ed[u][i]] = col;
      if (check(u + 1, up)) return 1;
      w[ed[u][i]] = 0;
      cur -= cost[u][i];
    }
  }
  total--;
  if (check(u + 1, up)) return 1;
  return 0;
}
int main() {
  scanf("%d%d%d", &n, &m, &t);
  for (int i = 0; i < m; i++) {
    int u, v, w;
    scanf("%d%d%d", &u, &v, &w);
    u--;
    v--;
    ed[u].push_back(v);
    cost[u].push_back(w);
  }
  int lo = 0, hi = 20000, mi;
  for (; lo < hi;) {
    mi = (lo + hi) / 2;
    total = cur = 0;
    col++;
    if (check(0, mi))
      hi = mi;
    else
      lo = mi + 1;
  }
  printf("%d\n", lo);
  return 0;
}
