#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const int MOD = 1000000007;
vector<pair<int, int> > g[22];
int q[5000000], qq, n;
void go(int id, int mask, int sum) {
  if (id == n + 1) {
    q[++qq] = sum;
    return;
  }
  for (int i = 0; i <= (int)(g[id]).size() - 1; ++i) {
    int to = g[id][i].first;
    if (mask & (1 << (to - 1))) {
    } else {
      go(id + 1, mask | (1 << (to - 1)), sum + g[id][i].second);
    }
  }
  go(id + 1, mask, sum);
}
int main() {
  int k, t;
  cin >> n >> k >> t;
  for (int i = 1; i <= k; ++i) {
    int x, y, z;
    cin >> x >> y >> z;
    g[x].push_back(make_pair(y, z));
  }
  qq = 0;
  go(1, 0, 0);
  sort(q + 1, q + qq + 1);
  cout << q[t] << endl;
}
