#include <bits/stdc++.h>
using namespace std;
const int MAXN = 22;
int n, k, t, res, a[MAXN][MAXN];
bool mark[MAXN];
vector<int> v;
void go(int i) {
  if (i == n + 1) {
    v.push_back(res);
    return;
  }
  for (int j = 0; j <= n; j++) {
    if (j == 0 || (!mark[j] && a[i][j] != 0)) {
      mark[j] = true;
      res += a[i][j];
      go(i + 1);
      res -= a[i][j];
      mark[j] = false;
    }
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> n >> k >> t;
  for (int i = 1, x, y, z; i <= k; i++) {
    cin >> x >> y >> z;
    a[x][y] = z;
  }
  go(1);
  sort(v.begin(), v.end());
  cout << v[t - 1];
  return 0;
}
