#include <bits/stdc++.h>
using namespace std;
int a[6][12], n;
vector<int> ans;
bool used[6];
void gen(int cnt, int pos = 1, int k = 0, int s = 0) {
  if (pos == n + 1 && k == cnt)
    ans.push_back(s);
  else if (pos <= n) {
    gen(cnt, pos + 1, k, s);
    for (int i = 1; i <= n; i++)
      if (a[pos][i + n] && !used[i] && k < cnt) {
        used[i] = true;
        gen(cnt, pos + 1, k + 1, s + a[pos][i + n]);
        used[i] = false;
      }
  }
}
int main() {
  int k, t, x, y, z;
  cin >> n >> k >> t;
  for (int i = 0; i < k; i++) {
    cin >> x >> y >> z;
    a[x][y + n] = z;
  }
  if (t == 1) {
    cout << 0;
    return 0;
  }
  t--;
  for (int i = 1;; i++) {
    ans.clear();
    gen(i);
    sort(ans.begin(), ans.end());
    if (ans.size() >= t) {
      cout << ans[t - 1];
      break;
    }
    t -= ans.size();
  }
  return 0;
}
