#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 7;
struct Edge {
  int nxt, to, w;
} edge[maxn];
int tot = 0, head[maxn], mid, n, cnt, vis[maxn];
void add(int u, int v, int w) {
  edge[tot].to = v;
  edge[tot].w = w;
  edge[tot].nxt = head[u];
  head[u] = tot++;
}
void dfs(int sum, int u) {
  if (sum > mid) {
    return;
  }
  if (u > n) {
    cnt++;
    return;
  }
  dfs(sum, u + 1);
  for (int i = head[u]; i != -1; i = edge[i].nxt) {
    int v = edge[i].to;
    if (!vis[v]) {
      vis[v] = 1;
      dfs(sum + edge[i].w, u + 1);
      vis[v] = 0;
    }
  }
}
int main() {
  memset(head, -1, sizeof(head));
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  int m, t;
  cin >> n >> m >> t;
  int a, b, c;
  for (int i = 0; i < m; i++) {
    cin >> a >> b >> c;
    add(a, b, c);
  }
  int l = 1, r = 1000 * n + 1;
  while (l < r) {
    cnt = 0;
    mid = (l + r) / 2;
    dfs(0, 1);
    if (cnt >= t) {
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  cout << l << endl;
}
