#include <bits/stdc++.h>
using namespace std;
int n, k, t, g[22][22];
int used[22];
multiset<int> S;
multiset<int>::iterator it;
void f(int cur, int point) {
  if (cur == n) {
    S.insert(point);
    return;
  }
  f(cur + 1, point);
  for (int i = 0; i < n; i++)
    if (used[i] == -1 && g[cur][i]) {
      used[i] = cur;
      f(cur + 1, point + g[cur][i]);
      used[i] = -1;
    }
}
int main() {
  cin >> n >> k >> t;
  for (int i = 0; i < k; i++) {
    int h, w, r;
    cin >> h >> w >> r;
    g[h - 1][w - 1] = r;
  }
  fill(used, used + n, -1);
  f(0, 0);
  int c = 0;
  for (it = S.begin(); it != S.end(); it++) {
    if (c == t - 1) {
      cout << *it;
      return 0;
    }
    c++;
  }
}
