#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10, inf = 1e10;
int n, k, t, m_match[30], f_match[30];
set<int> ans;
vector<pair<int, int> > adj[30];
void bt(int val = 0) {
  ans.insert(val);
  for (int(i) = (1); (i) <= (n); (i)++)
    if (m_match[i] == -1) {
      for (int(j) = 0; (j) < ((int((adj[i]).size()))); (j)++) {
        int v = adj[i][j].first, w = adj[i][j].second;
        if (f_match[v] == -1) {
          m_match[i] = +1;
          f_match[v] = +1;
          bt(val + w);
          m_match[i] = -1;
          f_match[v] = -1;
        }
      }
    }
}
int main() {
  memset(m_match, -1, sizeof m_match);
  memset(f_match, -1, sizeof f_match);
  scanf("%d%d%d", &n, &k, &t);
  for (int(i) = 0; (i) < (k); (i)++) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    adj[a].push_back(make_pair(b, c));
  }
  bt();
  vector<int> anss(((ans).begin()), ((ans).end()));
  printf("%d\n", anss[t - 1]);
  return 0;
}
