#include <bits/stdc++.h>
using namespace std;
const int maxn = 100;
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];
bool vis[maxn];
struct edge {
  int x, y, w;
  long long sta;
} E[maxn];
int cnt = 0;
int dfs(int p, int w, int limt, long long sta) {
  if (limt < w || cnt >= k) return 0;
  if (p == m + 1) {
    cnt++;
    return 1;
  }
  int r = 0, u = E[p].x, v = E[p].y;
  if (!(sta & E[p].sta)) {
    r = dfs(p + 1, w + E[p].w, limt, sta | E[p].sta);
  }
  if (r >= k) return r;
  r += dfs(p + 1, w, limt, sta);
  return r;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= m; ++i) {
    int x, y, w;
    cin >> x >> y >> w;
    E[i] = {x, y, w};
    long long s = 1ll << (x + n);
    s |= 1ll << y;
    E[i].sta = s;
  }
  sort(E + 1, E + m + 1,
       [](const edge &a, const edge &b) { return a.w < b.w; });
  int l = 0, r = n * 1000;
  while (l < r) {
    int mid = l + r >> 1;
    cnt = 0;
    int x = dfs(1, 0, mid, 0);
    x = cnt;
    if (x >= k)
      r = mid;
    else
      l = mid + 1;
  }
  cout << l << '\n';
  return 0;
}
