#include <bits/stdc++.h>
void quit();
using namespace std;
const long double PI = acos(-1);
const long double EPS = 1e-10;
double __t;
int r[10][10];
vector<int> m;
vector<int> w;
vector<int> ans;
inline int bc(int first) {
  int res = 0;
  while (first) {
    if (first & 1) ++res;
    first >>= 1;
  }
  return res;
}
int main() {
  int n, k, t;
  cin >> n >> k >> t;
  int mt, wt, rt;
  bool fl;
  for (int i = 0; i < k; ++i) {
    cin >> mt >> wt >> rt;
    --mt;
    --wt;
    r[mt][wt] = rt;
  }
  int ss = 0, tt;
  for (int i = 0; i < (1 << n); ++i)
    for (int j = 0; j < (1 << n); ++j)
      if (bc(i) == bc(j)) {
        m.clear();
        w.clear();
        for (int k = 0; k < n; ++k) {
          if (i & (1 << k)) m.push_back(k);
          if (j & (1 << k)) w.push_back(k);
        }
        sort(w.begin(), w.end());
        do {
          ss = 0;
          fl = 1;
          for (int k = 0; k < (int)m.size(); ++k) {
            if (r[m[k]][w[k]] == 0) fl = 0;
            ss += r[m[k]][w[k]];
          }
          if (fl) ans.push_back(ss);
        } while (next_permutation(w.begin(), w.end()));
      }
  sort(ans.begin(), ans.end());
  cout << ans[t - 1];
  quit();
}
void quit() { exit(0); }
