#include <bits/stdc++.h>
using namespace std;
int Tab[100][100];
int mark[100];
int n;
vector<int> Ans;
void per(int i) {
  if (i >= n) {
    int sum = 0;
    int B[20];
    for (int j = 0; j <= n; j++) B[j] = 0;
    for (int j = 0; j < n; j++) {
      if (mark[j] != 0 && B[mark[j]] == 1) return;
      B[mark[j]] = 1;
      sum += Tab[j + 1][mark[j]];
    }
    for (int j = 0; j < Ans.size(); j++) {
      if (Ans[j] == sum) return;
    }
    Ans.push_back(sum);
    return;
  }
  for (int j = 0; j <= n; j++) {
    mark[i] = j;
    per(i + 1);
  }
}
int main() {
  int k, t;
  cin >> n >> k >> t;
  for (int i = 0; i < k; i++) {
    int w, m, c;
    cin >> w >> m >> c;
    Tab[w][m] = c;
  }
  per(0);
  sort(Ans.begin(), Ans.end());
  cout << Ans[t - 1] << endl;
  return 0;
}
