#include <bits/stdc++.h>
using namespace std;
inline int rdi() {
  int d;
  scanf("%d", &d);
  return d;
}
inline char rdc() {
  scanf(" ");
  return getchar();
}
inline string rds() {
  string s;
  cin >> s;
  return s;
}
inline double rddb() {
  double d;
  scanf("%lf", &d);
  return d;
}
template <class T>
inline bool setmin(T& a, T b) {
  return a > b ? a = b, true : false;
}
template <class T>
inline bool setmax(T& a, T b) {
  return a < b ? a = b, true : false;
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& x) {
    cerr << x << ",";
    return *this;
  }
} dbgr;
const int N = 20;
struct Graph {
  int v;
  bool ma[N], mb[N];
  bool operator<(const Graph& r) const { return v < r.v; }
} g;
int n, k, t;
vector<Graph> vg;
int main() {
  vg.push_back(g), n = rdi(), k = rdi(), t = rdi();
  for (int repp = 0; repp < (k); ++repp) {
    int u = rdi() - 1, v = rdi() - 1, w = rdi();
    for (int i_b = (((int)(vg).size())), i = (0); i < i_b; ++i)
      if (!vg[i].ma[u] && !vg[i].mb[v]) {
        vg[i].ma[u] = vg[i].mb[v] = true, vg[i].v += w;
        vg.push_back(vg[i]);
        vg[i].ma[u] = vg[i].mb[v] = false, vg[i].v -= w;
      }
    if (((int)(vg).size()) > t) {
      nth_element(vg.begin(), vg.begin() + t - 1, vg.end());
      vg.erase(vg.begin() + t, vg.end());
    }
  }
  nth_element(vg.begin(), vg.begin() + t - 1, vg.end());
  cout << vg[t - 1].v << endl;
  return 0;
}
