#include <bits/stdc++.h>
using namespace std;
int n, k, t0, s = 0;
int g[30][30] = {0}, c[30][30] = {0};
bool chk[30] = {0};
int q[100000] = {0};
void dfs(int v) {
  if (v > n) {
    q[++q[0]] = s;
    return;
  }
  int i;
  dfs(v + 1);
  for (i = 1; i <= g[v][0]; i++)
    if (!chk[g[v][i]]) {
      chk[g[v][i]] = true;
      s += c[v][i];
      dfs(v + 1);
      s -= c[v][i];
      chk[g[v][i]] = false;
    }
}
void swap(int& a, int& b) {
  int c;
  c = a;
  a = b;
  b = c;
}
void sort(int h, int t) {
  int i = h, j = t, tmp;
  tmp = rand() % (t - h + 1) + h;
  swap(q[h], q[tmp]);
  while (i < j) {
    while (i < j && q[j] > q[h]) j--;
    while (i < j && q[i] <= q[h]) i++;
    swap(q[i], q[j]);
  }
  swap(q[h], q[i]);
  if (h < i - 1) sort(h, i - 1);
  if (j + 1 < t) sort(j + 1, t);
}
int main() {
  srand(time(0));
  int i, a0, b0, c0;
  scanf("%d%d%d", &n, &k, &t0);
  for (i = 1; i <= k; i++) {
    scanf("%d%d%d", &a0, &b0, &c0);
    g[a0][++g[a0][0]] = b0;
    c[a0][g[a0][0]] = c0;
  }
  dfs(1);
  sort(1, q[0]);
  printf("%d\n", q[t0]);
  return 0;
}
