#include <bits/stdc++.h>
using namespace std;
int n, m;
bool debug = false;
int k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
int mp[25][25], t;
priority_queue<int> q;
void dfs(int x, int s, int val) {
  if (q.size() == t && val > q.top()) return;
  if (x == n) {
    q.push(val);
    if (q.size() > t) q.pop();
    return;
  }
  dfs(x + 1, s, val);
  for (int(i) = 0; (i) < (int)(n); (i)++)
    if (((s >> i) & 1) == 0) {
      if (mp[x][i]) {
        dfs(x + 1, s | (1 << i), val + mp[x][i]);
      }
    }
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  int h, w, r;
  for (int(i) = 0; (i) < (int)(k); (i)++) {
    scanf("%d%d%d", &h, &w, &r);
    h--;
    w--;
    mp[h][w] = r;
  }
  dfs(0, 0, 0);
  printf("%d\n", q.top());
  return 0;
}
