#include <bits/stdc++.h>
using namespace std;
const long INF = (long)1e09;
struct node {
  int h, w, r;
};
int n, m, j, k, ans = 0, c, t, z, next = 0, b[30][30];
vector<int> all;
vector<pair<long, long> > a[30];
vector<bool> f(30, 0);
vector<node> d;
void dfs(int v, int pts) {
  int i, j;
  for (i = 0; i < a[v].size(); i++) {
    if (!f[a[v][i].first]) {
      all.push_back(pts + a[v][i].second);
      f[a[v][i].first] = 1;
      for (j = v + 1; j < n; j++) dfs(j, pts + a[v][i].second);
      f[a[v][i].first] = 0;
    }
  }
}
int main() {
  scanf("%d %d %d", &n, &k, &t);
  all.push_back(0);
  for (long i = 0; i < k; i++) {
    int x, y, z;
    scanf("%d %d %d", &x, &y, &z);
    x--;
    y--;
    a[y].push_back(make_pair(x, z));
  }
  for (long i = 0; i < n; i++) {
    for (long DEFINED_I = 0; DEFINED_I < n + 1; DEFINED_I++) f[DEFINED_I] = 0;
    dfs(i, 0);
  }
  sort(all.begin(), all.end());
  printf("%d", all[t - 1]);
  return 0;
}
