#include <bits/stdc++.h>
using namespace std;
int i, j, k, l, n, m, a[120][120], t, x, y;
priority_queue<int> q;
void dfs(int l, int s, int val) {
  if (q.size() == t && val > q.top()) return;
  if (l == n + 1) {
    q.push(val);
    if (q.size() > t) q.pop();
    return;
  }
  dfs(l + 1, s, val);
  for (int i = 1; i <= n; ++i)
    if (!(s >> i - 1 & 1) && a[l][i]) dfs(l + 1, s | 1 << i - 1, val + a[l][i]);
}
int main() {
  scanf("%d%d%d", &n, &m, &t);
  for (i = 1; i <= m; ++i) {
    scanf("%d%d%d", &x, &y, &k);
    a[x][y] = k;
  }
  dfs(1, 0, 0);
  printf("%d\n", q.top());
}
