#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:65777216")
using namespace std;
const int N = 111111;
const int INF = 111111111;
const double eps = 1e-9;
const double pi = 3.14159265358979;
map<long long, int> t;
int g[22][22], n, k, ne, a[6], ff[N], c;
bool b[22];
void rec(int num, int cur) {
  if (num == n + 1) {
    long long f = 0;
    for (int i = 1; i <= (n); i++) f = f * 100 + i * 10 + a[i];
    t[f] = cur;
    return;
  }
  rec(num + 1, cur);
  for (int i = 1; i <= (n); i++)
    if (!b[i] && g[num][i]) {
      a[num] = i;
      b[i] = 1;
      rec(num + 1, cur + g[num][i]);
      b[i] = 0;
      a[num] = 0;
    }
}
int main() {
  cin >> n >> k >> ne;
  for (int i = 1; i <= (k); i++) {
    int x, y, z;
    cin >> x >> y >> z;
    g[x][y] = z;
  }
  rec(1, 0);
  for (map<long long, int>::iterator it = t.begin(); it != t.end(); it++)
    ff[++c] = it->second;
  sort(ff + 1, ff + c + 1);
  cout << ff[ne] << endl;
  return 0;
}
