#include <bits/stdc++.h>
using namespace std;
int M[5][5];
vector<int> V;
bool U[5];
int n, k, t, a, b;
void foo(int s, int g) {
  if (s == n) {
    V.push_back(g);
    return;
  }
  foo(s + 1, g);
  for (int i = 0; i < 5; i++)
    if (M[s][i] && U[i] == 0) U[i] = 1, foo(s + 1, g + M[s][i]), U[i] = 0;
}
int main() {
  scanf("%d %d %d", &n, &k, &t);
  for (int i = 0; i < k; i++)
    scanf("%d %d", &a, &b), scanf("%d", &M[a - 1][b - 1]);
  foo(0, 0);
  sort(V.begin(), V.end());
  cout << V[t - 1] << endl;
  return 0;
}
