#include <bits/stdc++.h>
using namespace std;
struct ed {
  int u, v, c;
};
bool vis[200] = {0}, bis[200] = {0};
ed a[200];
int n, k, t;
int kind = 0;
int sum = 0, mid;
bool eis[200] = {0};
bool cmp(ed a, ed b) { return a.c < b.c; }
inline void dfs(int x, int cost) {
  if (kind >= t) {
    return;
  }
  if (x >= k) {
    kind++;
    return;
  }
  if (vis[a[x].u] == 0 && bis[a[x].v] == 0 && cost + a[x].c <= mid) {
    vis[a[x].u] = bis[a[x].v] = 1;
    dfs(x + 1, cost + a[x].c);
    vis[a[x].u] = bis[a[x].v] = 0;
  }
  if (kind >= t) return;
  dfs(x + 1, cost);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k >> t;
  for (int i = 0, u, v, c; i < k; i++) {
    cin >> a[i].u >> a[i].v >> a[i].c;
    sum += a[i].c;
  }
  sort(a, a + k, cmp);
  if (t == 1) {
    cout << 0;
    return 0;
  }
  int l = 0, r = n * 1000;
  while (l < r - 1) {
    mid = (l + r) >> 1;
    kind = 0;
    dfs(0, 0);
    if (kind >= t) {
      r = mid;
    } else {
      l = mid;
    }
  }
  cout << r;
}
