#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 22;
int n, m, t, sum = 0, top = 0;
vector<pair<int, int> > e[MAX_N];
bool ok[MAX_N];
int h[222222];
void swap(int &x, int &y) {
  int t = x;
  x = y;
  y = t;
}
void down_heap(int i) {
  int j = i << 1;
  if (j < top && h[j + 1] > h[j]) ++j;
  if (j > top || h[j] <= h[i]) return;
  swap(h[i], h[j]);
  down_heap(j);
}
void up_heap(int i) {
  int j = i >> 1;
  if (j < 1 || h[j] >= h[i]) return;
  swap(h[i], h[j]);
  up_heap(j);
}
void gen(int i) {
  if (top == t && sum > h[1]) return;
  if (i > n) {
    if (top == t) {
      h[1] = sum;
      down_heap(1);
    } else {
      h[++top] = sum;
      up_heap(top);
    }
    return;
  }
  gen(i + 1);
  for (int j = 0; j < int(e[i].size()); ++j) {
    int v = e[i][j].second;
    if (ok[v]) {
      ok[v] = false;
      sum += e[i][j].first;
      gen(i + 1);
      sum -= e[i][j].first;
      ok[v] = true;
    }
  }
}
int main() {
  cin >> n >> m >> t;
  for (int i = int(1); i <= int(m); ++i) {
    int x, y, w;
    scanf("%d%d%d", &x, &y, &w);
    e[x].push_back((make_pair((w), (y))));
  }
  memset(ok, (true), sizeof(ok));
  gen(1);
  cout << h[1];
  return 0;
}
