#include <bits/stdc++.h>
using namespace std;
int n, k, t;
int a[100][100];
vector<int> h;
bool used[100];
void solve(int m, int res) {
  if (m == n + 1) {
    h.push_back(res);
    return;
  }
  solve(m + 1, res);
  for (int i = 1; i <= n; i++)
    if (!used[i]) {
      used[i] = true;
      solve(m + 1, res + a[m][i]);
      used[i] = false;
    }
}
int main() {
  cin >> n >> k >> t;
  for (int i = 0; i < k; i++) {
    int m, w, r;
    cin >> m >> w >> r;
    a[m][w] = r;
  }
  solve(1, 0);
  sort(h.begin(), h.end());
  cout << h[t - 1];
  return 0;
}
