#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 22;
int n, sum = 0;
vector<pair<int, int> > e[MAX_N];
bool ok[MAX_N];
vector<int> a;
void gen(int i) {
  if (i > n) {
    a.push_back((sum));
    return;
  }
  gen(i + 1);
  for (int j = 0; j < int(e[i].size()); ++j) {
    int v = e[i][j].second;
    if (ok[v]) {
      ok[v] = false;
      sum += e[i][j].first;
      gen(i + 1);
      sum -= e[i][j].first;
      ok[v] = true;
    }
  }
}
int main() {
  int t, m;
  cin >> n >> m >> t;
  for (int i = int(1); i <= int(m); ++i) {
    int x, y, w;
    scanf("%d%d%d", &x, &y, &w);
    e[x].push_back((make_pair((w), (y))));
  }
  memset(ok, (true), sizeof(ok));
  gen(1);
  sort(a.begin(), a.end());
  cout << a[t - 1];
  return 0;
}
