#include <bits/stdc++.h>
using namespace std;
int vis[25], a[25][25];
int n, m, k, x, y, z, i, l, r, mid;
int DFS(int x, int now) {
  if (now > mid) return 0;
  if (x > n) return 1;
  int ret = DFS(x + 1, now);
  for (int i = 1; i <= n && ret < k; i++)
    if (!vis[i] && a[x][i])
      vis[i] = 1, ret += DFS(x + 1, now + a[x][i]), vis[i] = 0;
  if (ret >= k) ret = k;
  return ret;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (i = 1; i <= m; i++) scanf("%d%d%d", &x, &y, &z), a[x][y] = z;
  l = 0;
  r = 1000 * n;
  while (l < r) {
    mid = (l + r) >> 1;
    if (DFS(1, 0) >= k)
      r = mid;
    else
      l = mid + 1;
  }
  printf("%d\n", l);
}
