#include <bits/stdc++.h>
using namespace std;
const int maxn = 6;
vector<pair<int, int> > v[maxn];
bool mark[maxn];
vector<int> y;
void f(int x, int n, int val) {
  if (x == n) return (y.push_back(val), void());
  for (int i = 0; i < v[x].size(); i++)
    if (mark[v[x][i].first] == false) {
      mark[v[x][i].first] = true;
      f(x + 1, n, val + v[x][i].second);
      mark[v[x][i].first] = false;
    }
  f(x + 1, n, val);
}
int main() {
  int n, m, t;
  cin >> n >> m >> t;
  for (int i = 0; i < m; i++) {
    int x, y, c;
    cin >> x >> y >> c;
    x--, y--;
    v[x].push_back(make_pair(y, c));
  }
  int x = 0;
  f(x, n, 0);
  sort(y.begin(), y.end());
  cout << y[t - 1] << endl;
}
