#include <bits/stdc++.h>
using namespace std;
int heap[1000000];
int map[100][100];
int n, k, t, size;
void up(int i) {
  while (i > 1 && heap[i] > heap[i / 2]) {
    int tmp;
    tmp = heap[i], heap[i] = heap[i / 2], heap[i / 2] = tmp;
    i = i / 2;
  }
}
void down(int i) {
  while (i + i <= size) {
    int j = i, tmp;
    if (heap[i + i] > heap[j]) j = i + i;
    if (i + i + 1 <= size && heap[i + i + 1] > heap[j]) j = i + i + 1;
    if (i == j) return;
    tmp = heap[i], heap[i] = heap[i / 2], heap[i / 2] = tmp;
    i = j;
  }
}
void dfs(int dep, int zt, int res) {
  if (res > heap[1] && (size >= t)) return;
  if (dep == n + 1) {
    heap[++size] = res;
    up(1);
    if (size > t) {
      heap[1] = heap[size];
      size--;
      down(1);
    }
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (1 << i & zt) continue;
    if (map[dep][i] == 0) continue;
    dfs(dep + 1, zt | 1 << i, res + map[dep][i]);
  }
  dfs(dep + 1, zt, res);
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  for (int i = 1; i <= k; i++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    map[x][y] = z;
  }
  dfs(1, 0, 0);
  printf("%d\n", heap[1]);
}
