#include <bits/stdc++.h>
int cmp(const void *p, const void *q) { return *(int *)p - *(int *)q; }
int wo[8], b[8];
int a[8][8];
int s[100000], top = 0;
int n;
void dfs(int count) {
  if (count == n + 1) {
    int j;
    int ans = 0;
    for (j = 1; j <= n; j++) ans += a[j][wo[j]];
    s[top++] = ans;
  } else {
    int i;
    wo[count] = 0;
    dfs(count + 1);
    for (i = 1; i <= n; i++)
      if (!b[i]) {
        b[i] = 1;
        wo[count] = i;
        dfs(count + 1);
        b[i] = 0;
      }
  }
}
int main() {
  int k, t;
  int i;
  int p, q, c;
  scanf("%d%d%d", &n, &k, &t);
  for (i = 0; i < k; i++) {
    scanf("%d%d%d", &p, &q, &c);
    a[p][q] = c;
  }
  dfs(1);
  qsort(s, top, sizeof(s[0]), cmp);
  printf("%d\n", s[t - 1]);
  return 0;
}
