#include <bits/stdc++.h>
using namespace std;
int len, n;
int sor[10000];
int mar[10][10], pm[10], pw[10];
bool cmp(int a, int b) { return a < b; }
void dfs(int x, int s) {
  int i, j;
  if (x > n) {
    sor[len++] = s;
    return;
  }
  for (i = 0; i <= n; i++)
    if (pw[i] == 0 || i == 0) {
      pw[i] = 1;
      dfs(x + 1, s + mar[x][i]);
      pw[i] = 0;
    }
}
int main() {
  int k, t, h, w, r;
  int i, j, m;
  scanf("%d%d%d", &n, &k, &t);
  memset(mar, 0, sizeof(mar));
  memset(pm, 0, sizeof(pm));
  memset(pw, 0, sizeof(pw));
  for (i = 0; i < k; i++) {
    scanf("%d%d%d", &h, &w, &r);
    mar[h][w] = r;
  }
  len = 0;
  dfs(1, 0);
  sort(sor, sor + len, cmp);
  printf("%d\n", sor[t - 1]);
  return 0;
}
