#include <bits/stdc++.h>
using namespace std;
const int maxn = 20;
bool usedw[maxn];
int mmin = 10000;
bool usedh[maxn];
bool g[maxn][maxn];
int d[maxn][maxn];
int cnt = 0;
int n, k, t;
void gen(int x, int last, int cur) {
  if (cur + mmin > x || last >= n) return;
  for (int i = last; i <= last; i++) {
    for (int j = 0; j < n; j++) {
      if (!usedw[j] && g[i][j] && d[i][j] + cur <= x) {
        cnt++;
        usedw[j] = true;
        gen(x, last + 1, cur + d[i][j]);
        usedw[j] = false;
      }
    }
  }
  gen(x, last + 1, cur);
}
int calc(int x) {
  cnt = 0;
  gen(x, 0, 0);
  return cnt + 1;
}
int main(void) {
  scanf("%d %d %d", &n, &k, &t);
  for (int i = 0; i < k; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    --u, --v;
    g[u][v] = 1;
    scanf("%d", &d[u][v]);
    mmin = min(mmin, d[u][v]);
  }
  int l = 0, r = 20 * 1001;
  if (t == 1) {
    cout << 0 << endl;
    return 0;
  }
  while (r - l > 1) {
    int m = (l + r) / 2;
    if (calc(m) < t)
      l = m;
    else
      r = m;
  }
  cout << r << endl;
  return 0;
}
