#include <bits/stdc++.h>
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
using namespace std;
const long long MOD = 1e18;
long long n, m, k, tr[200005];
long long a[1005][1005];
int dfs(int u, int sum, int lim) {
  if (sum > lim) return 0;
  if (u > n) return 1;
  int ans = dfs(u + 1, sum, lim);
  for (int v = 1; v <= n && ans < k; v++) {
    if (!tr[v] && a[u][v])
      tr[v] = 1, ans += dfs(u + 1, sum + a[u][v], lim), tr[v] = 0;
  }
  return ans;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) {
    int u, v, w;
    cin >> u >> v >> w;
    a[u][v] = w;
  }
  long long l = 0, r = 20000, ans = 0;
  while (r >= l) {
    int mid = (r + l) >> 1;
    if (dfs(1, 0, mid) >= k)
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  cout << ans;
}
