#include <bits/stdc++.h>
using namespace std;
priority_queue<int> h;
int n, m, k, x, y, z, a[22][22];
bool b[22];
void dfs(int x, int y) {
  if (h.size() == k)
    if (y >= h.top()) return;
  if (x > n) {
    if (h.size() == k) h.pop();
    h.push(y);
    return;
  }
  dfs(x + 1, y);
  for (int i = 1; i <= n; i++)
    if (!b[i] && a[x][i]) b[i] = 1, dfs(x + 1, y + a[x][i]), b[i] = 0;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= m; i++) scanf("%d%d%d", &x, &y, &z), a[x][y] = z;
  dfs(1, 0);
  printf("%d\n", h.top());
  return 0;
}
