#include <bits/stdc++.h>
using namespace std;
void run();
int main() {
  ios::sync_with_stdio(false);
  run();
}
long long a[25], b[25], c[25];
bool used[100];
long long n, k, t;
map<long long, long long> ways;
long long tot;
void dfs(long long p, long long score = 0) {
  if (p == 0) {
    ++ways[score];
    ++tot;
    return;
  }
  p--;
  if (not used[a[p]] and not used[n + b[p]]) {
    used[a[p]] = used[n + b[p]] = true;
    dfs(p, score + c[p]);
    used[a[p]] = used[n + b[p]] = false;
  }
  dfs(p, score);
}
void run() {
  cin >> n >> k >> t;
  for (int i = k; i--;) cin >> a[i] >> b[i] >> c[i], --a[i], --b[i];
  dfs(k);
  for (auto it : ways) {
    t -= it.second;
    if (t <= 0) {
      cout << it.first << endl;
      return;
    }
  }
}
