#include <bits/stdc++.h>
using namespace std;
int e[25][25], n, k, m, x, y, v, cnt, mid;
bool vis[25];
void dfs(int pos, int cost) {
  if (pos > n) {
    cnt++;
    return;
  }
  dfs(pos + 1, cost);
  for (int i = 1; i <= n && cnt < k; i++) {
    if (!vis[i] && e[pos][i] && cost + e[pos][i] <= mid) {
      vis[i] = true;
      dfs(pos + 1, cost + e[pos][i]);
      vis[i] = false;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y >> v;
    e[x][y] = v;
  }
  int l = 0, r = n * 1000;
  while (l < r) {
    mid = (l + r) >> 1;
    cnt = 0;
    dfs(1, 0);
    if (cnt >= k)
      r = mid;
    else
      l = mid + 1;
  }
  cout << l << endl;
  return 0;
}
