#include <bits/stdc++.h>
using namespace std;
struct node {
  int val, v;
};
vector<node> v[25];
bool vis[25];
int n, k, t, cnt, mid;
void dfs(int x, int sum) {
  if (x > n) {
    ++cnt;
    return;
  }
  dfs(x + 1, sum);
  for (int i = 0; i < v[x].size() && cnt < t; ++i) {
    int y = v[x][i].v;
    if (!vis[y] && v[x][i].val + sum <= mid) {
      vis[y] = true;
      dfs(x + 1, sum + v[x][i].val);
      vis[y] = false;
    }
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> k >> t;
  for (int i = 1; i <= k; ++i) {
    int h, w, r;
    cin >> h >> w >> r;
    node tmp;
    tmp.v = w;
    tmp.val = r;
    v[h].push_back(tmp);
  }
  int l = 0, r = 1000 * n;
  int ans = 0;
  while (l <= r) {
    mid = (l + r) >> 1;
    cnt = 0;
    dfs(1, 0);
    if (cnt >= t) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  cout << ans << endl;
  return 0;
}
