#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 4e18;
const int inf = 2e9;
const double eps = 1e-13;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int suami[25];
vector<int> harem[25];
int poin[25][25];
vector<int> ans;
int n;
void find(int mask, int man, int temp) {
  int i;
  if (man == n) {
    ans.push_back(temp);
    return;
  }
  if (mask & (1 << man)) {
    for (i = 0; i < harem[man + 1].size(); ++i) {
      if (suami[harem[man + 1][i]] == 0 && poin[man + 1][harem[man + 1][i]]) {
        suami[harem[man + 1][i]] = man + 1;
        find(mask, man + 1, temp + poin[man + 1][harem[man + 1][i]]);
        suami[harem[man + 1][i]] = 0;
      }
    }
  } else {
    find(mask, man + 1, temp);
  }
}
int main(void) {
  int i, j, k, t;
  scanf("%d %d %d", &n, &k, &t);
  while (k--) {
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    harem[a].push_back(b);
    poin[a][b] = c;
  }
  int pol = (1 << n), mask;
  for (mask = 0; mask < pol; ++mask) {
    bool valid = 1;
    for (i = 0; i < n; ++i) {
      if ((mask & (1 << i)) && harem[i + 1].size() == 0) {
        valid = 0;
        break;
      }
    }
    if (!valid) continue;
    find(mask, 0, 0);
  }
  sort(ans.begin(), ans.end());
  cout << ans[t - 1] << endl;
  return 0;
}
