#include <bits/stdc++.h>
using namespace std;
int n, k, t, a[30][30], h, w, r, u[30];
priority_queue<int> q;
inline void rec(int pos, int val) {
  if (q.size() == t && val >= q.top()) return;
  if (pos == n + 1) {
    if (q.size() == t) q.pop();
    q.push(val);
    return;
  }
  rec(pos + 1, val);
  for (int i = 1; i <= n; ++i)
    if (!u[i] && a[pos][i]) {
      u[i] = true;
      rec(pos + 1, a[pos][i] + val);
      u[i] = false;
    }
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  for (int i = 1; i <= k; ++i) {
    scanf("%d%d%d", &h, &w, &r);
    a[h][w] = r;
  }
  rec(1, 0);
  printf("%d", q.top());
  return 0;
}
