#include <bits/stdc++.h>
using namespace std;
int n, k, cnt, t, h, w, r;
int c[25][25];
bool vis[25];
vector<pair<int, int> > p;
inline bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.second == b.second) return a.first < b.first;
  return a.second < b.second;
}
inline void dfs(int now, int num, int val) {
  if (now == n + 1) {
    p.push_back(make_pair(num, val));
    return;
  }
  dfs(now + 1, num, val);
  for (register int i = 1; i <= n; ++i) {
    if (c[now][i] == 0x3f3f3f3f) continue;
    if (vis[i] == 1) continue;
    vis[i] = 1;
    dfs(now + 1, num + 1, val + c[now][i]);
    vis[i] = 0;
  }
}
int main() {
  memset(c, 0x3f, sizeof(c));
  scanf("%d %d %d", &n, &k, &t);
  for (int i = 1; i <= k; ++i) {
    scanf("%d %d %d", &h, &w, &r);
    c[h][w] = r;
  }
  dfs(1, 0, 0);
  sort(p.begin(), p.end(), cmp);
  printf("%d\n", p[t].second);
  return 0;
}
