#include <bits/stdc++.h>
using namespace std;
int a[10][10];
vector<int> p;
vector<int> v;
bool mark[10];
int n;
void bt(int num, int x) {
  if (num == 0) {
    v.push_back(x);
    return;
  }
  bt(num - 1, x);
  for (int i = 1; i <= n; i++)
    if (a[num][i] != 0 && mark[i] == 0) {
      mark[i] = 1;
      bt(num - 1, x + a[num][i]);
      mark[i] = 0;
    }
}
int main() {
  int k, t;
  cin >> n >> k >> t;
  for (int i = 1; i <= k; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    a[x][y] = z;
  }
  bt(n, 0);
  sort(v.begin(), v.end());
  cout << v[t - 1] << endl;
  return 0;
}
