#include <bits/stdc++.h>
int value[21][21];
int yes[21][21];
int hash[21];
int seq[1 << 21], tot = 0;
int N, M, K;
void dfs(int x, int count) {
  int i, j;
  if (x <= N) {
    dfs(x + 1, count);
    for (i = 1; i <= N; ++i)
      if (hash[i] == 0 && yes[x][i] == 1) {
        hash[i] = 1;
        dfs(x + 1, count + value[x][i]);
        hash[i] = 0;
      }
  } else {
    seq[++tot] = count;
  }
}
int main() {
  int i, j, sc, sv, t;
  scanf("%d%d%d", &N, &M, &K);
  for (i = 1; i <= M; ++i) {
    scanf("%d%d%d", &sc, &sv, &t);
    value[sc][sv] = t;
    yes[sc][sv] = 1;
  }
  dfs(1, 0);
  std::sort(seq + 1, seq + tot + 1);
  printf("%d\n", seq[K]);
  return 0;
}
