#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 110;
const double pi = acos(-1.0);
int n, k, t;
int e[maxn][maxn] = {0};
int mid;
int cnt;
bool vis[maxn];
void dfs(int x, int now_tot) {
  if (x > n) {
    cnt++;
    return;
  }
  dfs(x + 1, now_tot);
  for (int y = 1; y <= n && cnt < t; y++) {
    if (!vis[y] && e[x][y] && e[x][y] + now_tot <= mid) {
      vis[y] = 1;
      dfs(x + 1, e[x][y] + now_tot);
      vis[y] = 0;
    }
  }
}
int main() {
  cin >> n >> k >> t;
  int u, v, w;
  for (int i = 1; i <= k; i++) {
    scanf("%d%d%d", &u, &v, &w);
    e[u][v] = w;
  }
  int l = 0, r = k * 1000;
  while (l <= r) {
    mid = (l + ((r - l) >> 1));
    cnt = 0;
    memset(vis, 0, sizeof(vis));
    dfs(1, 0);
    if (cnt >= t) {
      r = mid - 1;
    } else
      l = mid + 1;
  }
  cout << l << endl;
  return 0;
}
