#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
clock_t __stt;
inline void TStart() { __stt = clock(); }
inline void TReport() {
  printf("\nTaken Time : %.3lf sec\n",
         (double)(clock() - __stt) / CLOCKS_PER_SEC);
}
template <typename T>
T MIN(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
T MAX(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
T ABS(T a) {
  return a > 0 ? a : (-a);
}
template <typename T>
void UMIN(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
void UMAX(T &a, T b) {
  if (b > a) a = b;
}
int n, m, T, w[20][20], pw[20];
bool used[20];
priority_queue<pair<int, int> > pq;
short arr[3000000][20], p[20];
int main() {
  int i, j, k, C;
  scanf("%d%d%d", &n, &m, &T);
  memset(w, -1, sizeof(w));
  for (i = 0; i < m; ++i) {
    int a, b, r;
    scanf("%d%d%d", &a, &b, &r);
    --a;
    --b;
    w[a][b] = r;
  }
  memset(p, -1, sizeof(p));
  memcpy(arr[0], p, sizeof(p));
  pq.push(make_pair(0, 0));
  pw[0] = 1;
  for (i = 1; i < n; ++i) {
    pw[i] = (long long)pw[i - 1] * 37ll % 2999999ll;
  }
  while (T--) {
    C = -pq.top().first;
    int hs = pq.top().second;
    pq.pop();
    memcpy(p, arr[hs], sizeof(p));
    memset(used, 0, sizeof(used));
    for (i = 0; i < n; ++i) used[p[i]] = 1;
    for (i = 0; i < n; ++i) {
      if (p[i] == -1)
        for (j = 0; j < n; ++j) {
          if (!used[j] && w[i][j] != -1) {
            int P = ((long long)hs + (long long)(j + 1) * (long long)pw[i]) %
                    2999999ll;
            if (!arr[P][0] && !arr[P][1]) {
              memcpy(arr[P], p, sizeof(p));
              arr[P][i] = j;
              pq.push(make_pair(-C - w[i][j], P));
            }
          }
        }
    }
  }
  printf("%d\n", C);
  return 0;
}
