#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
const long long LINF = 1ll * INF * INF;
int n, m, t, a[20][20];
priority_queue<int> u;
void gao(int x, int sum, int mask) {
  if (u.size() == t && sum >= u.top()) return;
  if (x == n) {
    if (u.size() == t) u.pop();
    return u.push(sum);
  }
  gao(x + 1, sum, mask);
  for (int s = mask; s; s &= s - 1) {
    int y = __builtin_ctz(s);
    if (a[x][y]) gao(x + 1, sum + a[x][y], mask ^ 1 << y);
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &t);
  for (int i = 0; i < m; i++) {
    int x, y, c;
    scanf("%d%d%d", &x, &y, &c);
    a[x - 1][y - 1] += c;
  }
  gao(0, 0, (1 << n) - 1);
  printf("%d\n", u.top());
}
