#include <bits/stdc++.h>
using namespace std;
template <typename TYPE>
inline TYPE sqr(const TYPE& a) {
  return (a) * (a);
}
const int INF = 1000 * 1000 * 1000;
const long double EPS = 1e-9;
const long double PI = 2 * acos(0.0);
const int N = 10;
int n;
vector<pair<int, int> > g[N];
bool used[N];
vector<int> v;
void rec(int h, int s) {
  if (h >= n) {
    v.push_back(s);
    return;
  }
  rec(h + 1, s);
  for (int i = 0; i < int(g[h].size()); ++i) {
    pair<int, int>& wd = g[h][i];
    if (!used[wd.first]) {
      used[wd.first] = 1;
      rec(h + 1, s + wd.second);
      used[wd.first] = 0;
    }
  }
}
int main() {
  int k, t;
  scanf("%d%d%d", &n, &k, &t);
  --t;
  for (int i = 0; i < int(k); ++i) {
    int x, y, r;
    scanf("%d%d%d", &x, &y, &r);
    --x, --y;
    g[x].push_back(pair<int, int>(y, r));
  }
  rec(0, 0);
  sort((v).begin(), (v).end());
  assert(t < (int)v.size());
  printf("%d\n", v[t]);
  return 0;
}
