#include <bits/stdc++.h>
using namespace std;
int n, m, k, a[100], b[100], c[100], ans;
bool mark[10], seen[10000];
void BT(int n) {
  seen[ans] = true;
  if (n > ::n) return;
  BT(n + 1);
  for (int i = 0; i < m; i++)
    if (a[i] == n && !mark[b[i]]) {
      mark[b[i]] = true;
      ans += c[i];
      BT(n + 1);
      ans -= c[i];
      mark[b[i]] = false;
    }
  return;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) cin >> a[i] >> b[i] >> c[i];
  int t = 0, i = 0;
  BT(1);
  while (t < k) {
    if (seen[i]) t++;
    i++;
  }
  cout << i - 1 << endl;
  return 0;
}
