#include <bits/stdc++.h>
const int MaxValue = 1024;
int result[50000];
int cr = 0;
int couple[6][6];
int n;
bool col[6];
void kCouple(int startRow, int k, int j, int total) {
  int i;
  if (j == k) {
    result[cr++] = total;
    return;
  }
  if (startRow > n) return;
  for (i = 1; i <= n; i++) {
    if (couple[startRow][i] != MaxValue && (!col[i])) {
      col[i] = true;
      kCouple(startRow + 1, k, j + 1, total + couple[startRow][i]);
      col[i] = false;
      kCouple(startRow + 1, k, j, total);
    }
  }
}
int main(void) {
  int k, t;
  int i, j, x, y, r;
  int temp, min;
  scanf("%d%d%d", &n, &k, &t);
  for (i = 1; i <= n; i++) {
    col[i] = false;
    for (j = 1; j <= n; j++) {
      couple[i][j] = MaxValue;
    }
  }
  result[cr++] = 0;
  for (i = 1; i <= k; i++) {
    scanf("%d%d%d", &x, &y, &r);
    couple[x][y] = r;
    result[cr++] = r;
  }
  if (t == 1) {
    printf("0\n");
    return 0;
  }
  for (i = 2; i <= n; i++) {
    kCouple(1, i, 0, 0);
  }
  for (i = 1; i < t; i++) {
    min = i;
    for (j = i; j < cr; j++) {
      if (result[j] <= result[min]) {
        min = j;
      }
    }
    if (min != i) {
      if (result[min] == result[i]) {
        t++;
      }
      temp = result[min];
      result[min] = result[i];
      result[i] = temp;
    }
  }
  printf("%d\n", result[i - 1]);
  return 0;
}
