#include <bits/stdc++.h>
using namespace std;
int n;
int s[5][5];
bool wu[5];
int c = 0;
vector<int> a;
void f(int t) {
  if (t == n) {
    a.push_back(c);
    return;
  }
  f(t + 1);
  for (int i = 0; i < n; ++i)
    if (!wu[i] && s[t][i]) {
      c += s[t][i];
      wu[i] = true;
      f(t + 1);
      wu[i] = false;
      c -= s[t][i];
    }
}
int main() {
  int k, t;
  int h, w, r;
  cin >> n >> k >> t;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) s[i][j] = 0;
  for (int i = 0; i < k; ++i) {
    cin >> h >> w >> r;
    s[h - 1][w - 1] = r;
  }
  fill_n(wu, n, false);
  f(0);
  sort(a.begin(), a.end());
  cout << a[t - 1];
  return 0;
}
