#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, t;
  cin >> n >> k >> t;
  int weight[21][21];
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) weight[i][j] = 0;
  while (k--) {
    int h, w, r;
    cin >> h >> w >> r;
    weight[h][w] = r;
  }
  vector<int> ans;
  for (int marraiges = 0; marraiges <= n; marraiges++) {
    vector<int> v(n, 0);
    for (int i = 0; i < marraiges; i++) v[i] = 1;
    sort((v).begin(), (v).end());
    vector<int> men = v;
    do {
      vector<int> women = v;
      do {
        vector<int> netmen;
        vector<int> netwomen;
        for (int i = 0; i < n; i++) {
          if (men[i] == 1) netmen.push_back(i + 1);
          if (women[i] == 1) netwomen.push_back(i + 1);
        }
        do {
          int count = 0;
          for (int i = 0; i < netmen.size(); i++)
            count += weight[netmen[i]][netwomen[i]];
          ans.push_back(count);
        } while (next_permutation((netwomen).begin(), (netwomen).end()));
      } while (next_permutation((women).begin(), (women).end()));
    } while (next_permutation((men).begin(), (men).end()));
  }
  sort((ans).begin(), (ans).end());
  cout << ans[t - 1] << endl;
}
