#include <bits/stdc++.h>
using namespace std;
const int maxn = 40;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
void MOD(int &x) {
  if (x >= mod) x -= mod;
}
void MOD(long long &x) {
  if (x >= mod) x -= mod;
}
long long powmod(long long x, long long n) {
  long long ret = 1;
  for (; n > 0; n >>= 1, x = x * x % mod)
    if (n & 1) ret = ret * x % mod;
  return ret;
}
int n, m, k;
vector<pair<int, int> > v[maxn];
int c[maxn][maxn];
bool vis[maxn];
int dfs(int p, int w, int limt) {
  if (limt < w) return 0;
  if (p == n + 1) return 1;
  int r = dfs(p + 1, w, limt);
  for (int i = 1; i <= n && r <= k; ++i) {
    if (!vis[i] && c[p][i]) {
      vis[i] = 1;
      r += dfs(p + 1, w + c[p][i], limt);
      vis[i] = 0;
    }
  }
  return r;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= m; ++i) {
    int x, y, w;
    cin >> x >> y >> w;
    c[x][y] = w;
  }
  int l = 0, r = n * 1000;
  while (l < r) {
    int mid = l + r >> 1;
    int x = dfs(1, 0, mid);
    if (x >= k)
      r = mid;
    else
      l = mid + 1;
  }
  cout << l << '\n';
  return 0;
}
