#include <bits/stdc++.h>
using namespace std;
namespace IO {
const int sz = 1 << 15;
char inbuf[sz], outbuf[sz];
char *pinbuf = inbuf + sz;
char *poutbuf = outbuf;
inline char _getchar() {
  if (pinbuf == inbuf + sz) fread(inbuf, 1, sz, stdin), pinbuf = inbuf;
  return *(pinbuf++);
}
inline void _putchar(char x) {
  if (poutbuf == outbuf + sz) fwrite(outbuf, 1, sz, stdout), poutbuf = outbuf;
  *(poutbuf++) = x;
}
inline void flush() {
  if (poutbuf != outbuf)
    fwrite(outbuf, 1, poutbuf - outbuf, stdout), poutbuf = outbuf;
}
}  // namespace IO
inline int read() {
  int x = 0, p = 1;
  char c = IO::_getchar();
  while (c < '0' || c > '9') {
    if (c == '-') p = -1;
    c = IO::_getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - 48, c = IO::_getchar();
  return x * p;
}
const int Maxn = 22;
const int Maxm = 105;
int eu[Maxm], ev[Maxm], ew[Maxm], n, m, t;
int dat[500005][Maxn], W[500005];
long long Ha[500005];
bool usey[500005][Maxn];
vector<int> CanUse;
struct S {
  int I;
  bool operator<(const S &s) const {
    if (W[I] != W[s.I]) return W[I] < W[s.I];
    return I < s.I;
  }
};
multiset<S> id;
unordered_set<long long> Vis;
int main() {
  scanf("%d %d %d", &n, &m, &t);
  for (int i = 0; i < m; i++) {
    scanf("%d %d %d", &eu[i], &ev[i], &ew[i]);
  }
  for (int i = 1; i < 500005; i++) CanUse.push_back(i);
  S zero;
  zero.I = 0;
  id.insert(zero);
  int lim = 2e9;
  while (!id.empty()) {
    int Id = (*id.begin()).I;
    id.erase(id.begin());
    t--;
    if (t == 0) {
      printf("%d\n", W[Id]);
      return 0;
    }
    for (int i = 0; i < m; i++) {
      if (!dat[Id][eu[i]] && !usey[Id][ev[i]]) {
        int TW = W[Id] + ew[i];
        if (TW >= lim) continue;
        int nid = CanUse.back();
        CanUse.pop_back();
        for (int j = 1; j <= n; j++) dat[nid][j] = dat[Id][j];
        for (int j = 1; j <= n; j++) usey[nid][j] = usey[Id][j];
        usey[nid][ev[i]] = 1;
        dat[nid][eu[i]] = ev[i];
        Ha[nid] = 0;
        W[nid] = TW;
        for (int j = 1; j <= n; j++) {
          Ha[nid] = Ha[nid] * 394291323 + dat[nid][j];
        }
        if (Vis.find(Ha[nid]) != Vis.end()) {
          CanUse.push_back(nid);
          continue;
        }
        Vis.insert(Ha[nid]);
        S tt;
        tt.I = nid;
        id.insert(tt);
      }
    }
    if (id.size() > t) {
      while (id.size() != t) {
        int tmp = (*id.rbegin()).I;
        CanUse.push_back(tmp);
        Vis.erase(Ha[tmp]);
        id.erase(*id.rbegin());
      }
      int tmp = (*id.rbegin()).I;
      lim = W[tmp];
    }
  }
  return ~~(0 ^ 0 ^ 0);
}
