#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3fffffff;
const int maxn = 25;
int k, n, m, g[maxn][maxn], e[maxn];
priority_queue<int> q;
void dfs(int cur, int sum, int mask) {
  if (q.size() == k) {
    if (q.top() <= sum) return;
    q.pop();
    q.push(sum);
  } else
    q.push(sum);
  if (cur > n) return;
  for (int i = cur; i <= n; i++)
    for (int j = 0; j < n; j++)
      if (!(mask & (1 << j)) && (e[i] & (1 << j)))
        dfs(i + 1, sum + g[i][j + 1], mask ^ (1 << j));
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  int u, v, w;
  while (m--) {
    scanf("%d%d%d", &u, &v, &w);
    g[u][v] = w;
    e[u] |= (1 << (v - 1));
  }
  dfs(1, 0, 0);
  printf("%d\n", q.top());
  return 0;
}
