#include <bits/stdc++.h>
static const int INF = std::numeric_limits<int>::max();
int n, k, t;
int v[100][100];
std::vector<int> ans;
void recur(int d, int mask1, int mask2,
           std::vector<std::pair<int, int> >& cpl) {
  if (d == n) {
    int res = 0;
    for (int i = 0; i < (int)cpl.size(); ++i) {
      if (cpl[i].first < 0) {
        continue;
      }
      res += v[cpl[i].first][cpl[i].second];
    }
    ans.push_back(res);
  }
  for (int i = 0; i < n; ++i) {
    if (mask2 & (1 << i)) {
      continue;
    }
    cpl.push_back(std::make_pair(d, i));
    recur(d + 1, mask1 | (1 << d), mask2 | (1 << i), cpl);
    cpl.pop_back();
    cpl.push_back(std::make_pair(-d, i));
    recur(d + 1, mask1 | (1 << d), mask2 | (1 << i), cpl);
    cpl.pop_back();
  }
}
int main() {
  std::cin >> n >> k >> t;
  for (int i = 0; i < k; ++i) {
    int h, w, r;
    std::cin >> h >> w >> r;
    --h;
    --w;
    v[h][w] = r;
  }
  std::vector<std::pair<int, int> > cpl;
  recur(0, 0, 0, cpl);
  std::sort(ans.begin(), ans.end());
  std::cout << ans[t - 1] << std::endl;
}
