#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:20000000")
using namespace std;
int ri() {
  int x;
  scanf("%d", &x);
  return x;
}
long long rll() {
  long long x;
  scanf("%lld", &x);
  return x;
}
int mas[30][30];
multiset<int> st;
set<int> M;
int P;
int n, m, t;
int now = 0;
int T;
void go(int pos, int MASK, int hm) {
  if (pos == 0) {
    if (M.find(hm) == M.end()) st.insert(now), M.insert(hm);
    return;
  }
  for (int i = (int)(0); i <= (int)(n - 1); i++)
    for (int j = (int)(n); j <= (int)(2 * n - 1); j++) {
      if (MASK & (1 << i) || MASK & (1 << j)) continue;
      if (mas[i + 1][j - n + 1] == 0) continue;
      int buf = mas[i + 1][j - n + 1];
      now += buf;
      int pf = (1 << (i * n + j - n));
      go(pos - 1, MASK | (1 << i) | (1 << j), hm | pf);
      now -= buf;
    }
}
void solve() {
  n = ri(), m = ri(), t = ri();
  for (int i = (int)(1); i <= (int)(m); i++) {
    int a = ri(), b = ri(), r = ri();
    mas[a][b] = r;
  }
  for (P = 1; P <= n; P++) T = 0, go(P, 0, 0);
  st.insert(0);
  multiset<int>::iterator it = st.begin();
  for (int i = (int)(2); i <= (int)(t); i++) it++;
  cout << *it << endl;
}
int main() {
  solve();
  return 0;
}
