#include <bits/stdc++.h>
using namespace std;
const int SIZE = 100000000;
unsigned short a[SIZE];
int ap;
const int cnt = 30;
int g[cnt][cnt];
bool female[cnt];
int N;
void get(int n, int ans) {
  if (n > N) {
    a[ap++] = ans;
    return;
  }
  int i;
  get(n + 1, ans);
  for (i = 1; i <= N; i++) {
    if (g[n][i] == 0 || female[i]) continue;
    female[i] = true;
    get(n + 1, ans + g[n][i]);
    female[i] = false;
  }
}
int main() {
  int k, t;
  int h, w, r;
  int i, j;
  memset(g, 0, sizeof(g));
  memset(female, false, sizeof(female));
  ap = 0;
  scanf("%d%d%d", &N, &k, &t);
  for (i = 0; i < k; i++) {
    scanf("%d%d%d", &h, &w, &r);
    g[h][w] = r;
  }
  get(1, 0);
  sort(a, a + ap);
  cout << a[t - 1] << endl;
}
