#include <bits/stdc++.h>
using namespace std;
int x[105][105];
int main() {
  int n, k, t;
  cin >> n >> k >> t;
  int i;
  for (i = 0; i < k; i++) {
    int a, b, w;
    cin >> a >> b >> w;
    a--;
    b--;
    x[a][b] = w;
  }
  int tot = 1;
  for (i = 0; i < n; i++) tot *= n + 1;
  vector<int> v;
  for (i = 0; i < tot; i++) {
    int j;
    int tmp = i;
    bool vis[10] = {0};
    bool ok = true;
    int q = 0;
    for (j = 0; j < n; j++) {
      int choice = tmp % (n + 1);
      if (choice < n) {
        if (vis[choice] || !x[j][choice]) {
          ok = false;
          break;
        }
        vis[choice] = true;
        q += x[j][choice];
      }
      tmp /= n + 1;
    }
    if (ok) v.push_back(q);
  }
  sort(v.begin(), v.end());
  cout << v[t - 1] << endl;
  return 0;
}
