#include <bits/stdc++.h>
using namespace std;
const int N = 17;
const int M = 1 << N;
int n, k, t, x, y, w, S;
int a[N][N], cnt[M];
multiset<short int> m[N][M];
vector<int> ans, tmp;
int main() {
  cin >> n >> k >> t;
  if (n > 15) return cout << "qwerty", 0;
  S = 1 << n;
  for (int i = 1; i < S; i++) {
    int x = i;
    while (x) {
      cnt[i] += x % 2;
      x /= 2;
    }
  }
  for (int i = 0; i < k; i++) {
    scanf("%d%d%d", &x, &y, &w);
    a[x - 1][y - 1] = w;
  }
  m[0][0].insert(0);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < S; j++)
      if (cnt[j] <= i) {
        tmp.clear();
        for (multiset<short int>::iterator q = m[i][j].begin();
             q != m[i][j].end(); q++) {
          tmp.push_back(*q);
          m[i + 1][j].insert(*q);
        }
        for (int q = 0; q < n; q++)
          if ((j & (1 << q)) == 0 && a[i][q]) {
            int m1 = j | (1 << q);
            for (int z = 0; z < (int)tmp.size(); z++) {
              m[i + 1][m1].insert(tmp[z] + a[i][q]);
            }
          }
      }
  for (int i = 0; i < S; i++)
    for (multiset<short int>::iterator q = m[n][i].begin(); q != m[n][i].end();
         q++)
      ans.push_back(*q);
  sort(ans.begin(), ans.end());
  cout << ans[t - 1];
  return 0;
}
