#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:33554432")
using namespace std;
const double PI = 2 * acos(0.0);
const double EPS = 1e-8;
const int INF = (1 << 30) - 1;
int n, k, t, counter;
pair<int, pair<int, int> > r[100];
void recit(int p, int rest, int mask1, int mask2) {
  ++counter;
  if (counter > t) return;
  for (int i = p; i < k && r[i].first <= rest; ++i) {
    if (((mask1 >> r[i].second.first) & 1) &&
        ((mask2 >> r[i].second.second) & 1)) {
      recit(i + 1, rest - r[i].first, mask1 - (1 << r[i].second.first),
            mask2 - (1 << r[i].second.second));
    }
  }
}
int cnt(int maxs) {
  counter = 0;
  recit(0, maxs, (1 << n) - 1, (1 << n) - 1);
  return counter;
}
int main() {
  cin >> n >> k >> t;
  for (int i = 0; i < k; ++i) {
    int a, b, w;
    cin >> a >> b >> w;
    --a;
    --b;
    r[i] = make_pair(w, make_pair(a, b));
  }
  sort(r, r + k);
  int lo = -1, hi = 0;
  for (int i = 0; i < k; ++i) hi += r[i].first;
  while (hi - lo > 1) {
    int mi = (lo + hi) / 2;
    if (cnt(mi) >= t)
      hi = mi;
    else
      lo = mi;
  }
  cout << hi;
  return 0;
};
