#include <bits/stdc++.h>
using namespace std;
int dis[10][10] = {};
int n, k, t;
int main(void) {
  ios::sync_with_stdio(false);
  cin >> n >> k >> t;
  for (int i = 0; i < (k); ++i) {
    int a, b, c;
    cin >> a >> b >> c;
    --a;
    --b;
    dis[a][b] = c;
  }
  vector<int> ans;
  for (int mask1 = 0; mask1 < (1 << n); ++mask1)
    for (int mask2 = 0; mask2 < (1 << n); ++mask2) {
      bitset<5> b1(mask1), b2(mask2);
      if (b1.count() != b2.count()) continue;
      int l = b1.count();
      vector<int> a1, a2;
      for (int i = 0; i < (n); ++i)
        if (b1[i]) a1.push_back(i);
      for (int i = 0; i < (n); ++i)
        if (b2[i]) a2.push_back(i);
      vector<int> p(l);
      for (int i = 0; i < (l); ++i) p[i] = i;
      do {
        int res = 0;
        for (int i = 0; i < (l); ++i) res += dis[a1[i]][a2[p[i]]];
        ans.push_back(res);
      } while (next_permutation((p).begin(), (p).end()));
    }
  sort((ans).begin(), (ans).end());
  cout << ans[t - 1] << endl;
  return 0;
}
