#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
const int ST = 100010;
const int ST1 = 1000010;
const long long MOD = 1000000007;
long long ABS(long long a) {
  if (a < 0)
    return a * (-1);
  else
    return a;
}
vector<long long> pr;
vector<long long> cost;
bool used[22];
bool used2[22];
vector<vector<pair<int, int> > > vv(22);
long long ans = 0;
int n;
void dfs(int v, int p, long long sum) {
  used[v] = true;
  used2[p] = true;
  for (int i = v + 1; i < n; i++) {
    if (!used[i]) {
      for (int j = 0; j < (int)((vv[i]).size()); j++)
        if (!used2[vv[i][j].first])
          dfs(i, vv[i][j].first, sum + vv[i][j].second);
    }
  }
  used[v] = false;
  used2[p] = false;
  pr.push_back(sum);
}
int main() {
  int k, t;
  cin >> n >> k >> t;
  pr.push_back(0);
  t--;
  for (int i = 0; i < k; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    a--;
    b--;
    vv[a].push_back(make_pair(b, c));
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < (int)((vv[i]).size()); j++) {
      used[i] = true;
      used2[vv[i][j].first] = true;
      dfs(i, vv[i][j].first, vv[i][j].second);
      used[i] = false;
      used2[vv[i][j].first] = false;
    }
  }
  sort(pr.begin(), pr.end());
  cout << pr[t];
}
