#include <bits/stdc++.h>
using namespace std;
const int N = 25;
int cost[N][N], n, k, t, perm[N], sum;
vector<int> pos[N + 5];
int main() {
  cin >> n >> k >> t;
  for (int i = 0; i < k; i++) {
    int h, w;
    cin >> h >> w;
    h--, w--;
    cin >> cost[h][w];
  }
  int top = (1 << n);
  pos[0].push_back(0);
  for (int i = 0; i < n; i++) perm[i] = i;
  do {
    for (int j = 1; j < top; j++) {
      bool ok = true;
      sum = 0;
      int cnt = 0;
      for (int i = 0, p = 1; i < n; i++, p *= 2) {
        if (!(p & j)) continue;
        cnt++;
        if (!cost[i][perm[i]]) ok = false;
        sum += cost[i][perm[i]];
      }
      if (ok && cnt) pos[cnt].push_back(sum);
    }
  } while (next_permutation(perm, perm + n));
  for (int i = 1; i <= n; i++) sort(pos[i].begin(), pos[i].end());
  for (int i = n, j = 1; i >= 1; i--, j *= max((n - i), 1)) {
    for (int t = 0; t < (pos[i]).size(); t += j) pos[0].push_back(pos[i][t]);
  }
  sort(pos[0].begin(), pos[0].end());
  cout << pos[0][t - 1] << endl;
  return 0;
}
