#include <bits/stdc++.h>
using namespace std;
const int maxn = 22;
int n, k, t;
priority_queue<int> que;
int ditu[maxn][maxn];
bool used[maxn];
void dfs(int step, int tot) {
  if (que.size() >= t && tot >= que.top()) return;
  if (step > n) {
    que.push(tot);
    while (que.size() > t) que.pop();
    return;
  }
  dfs(step + 1, tot);
  for (int i = 1; i <= n; ++i)
    if (!used[i] && ditu[step][i] != 0) {
      used[i] = true;
      dfs(step + 1, tot + ditu[step][i]);
      used[i] = false;
    }
}
int main() {
  scanf("%d%d%d", &n, &k, &t);
  ++t;
  memset(ditu, 0, sizeof(ditu));
  int x, y;
  for (int i = 1; i <= k; ++i) {
    scanf("%d%d", &x, &y);
    scanf("%d", &ditu[x][y]);
  }
  memset(used, false, sizeof(used));
  que.push(0);
  dfs(1, 0);
  printf("%d\n", que.top());
  return 0;
}
