#include <bits/stdc++.h>
using namespace std;
int pr[10][10];
bool used[10];
int nat[1000000], natInd = 0;
int n;
void back(int num, int res) {
  if (num == n) {
    nat[natInd++] = res;
    return;
  }
  for (int i = 0; i < n; i++) {
    if (!used[i] && pr[num][i]) {
      used[i] = true;
      back(num + 1, res + pr[num][i]);
      used[i] = false;
    }
  }
  back(num + 1, res);
}
int main() {
  int k, c;
  cin >> n >> k >> c;
  int in1, in2, val;
  for (int i = 0; i < k; i++) {
    cin >> in1 >> in2 >> val;
    pr[in1 - 1][in2 - 1] = val;
  }
  back(0, 0);
  sort(nat, nat + natInd);
  cout << nat[c - 1] << endl;
  return 0;
}
