#include <bits/stdc++.h>
using namespace std;
int n, k, t;
vector<pair<int, int> > mg[6];
int memo[1000005] = {0}, wused[6] = {0};
set<int> second;
void solve(int man, int tot) {
  if (man == n) {
    memo[tot]++;
    return;
  }
  solve(man + 1, tot);
  for (int j = 0; j < int((mg[man]).size()); ++j) {
    int woman = mg[man][j].first, v = mg[man][j].second;
    if (wused[woman]) continue;
    wused[woman] = 1;
    solve(man + 1, tot + v);
    wused[woman] = 0;
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  for (int i = 0; i < k; ++i) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    a--;
    b--;
    mg[a].push_back(pair<int, int>(b, c));
  }
  solve(0, 0);
  vector<int> psb;
  for (int i = 0; i < 1000000; ++i)
    for (int j = 0; j < memo[i]; ++j) psb.push_back(i);
  printf("%d\n", psb[t - 1]);
  return 0;
}
