#include <bits/stdc++.h>
using namespace std;
int G[7][7];
int n, vis[7];
vector<int> ans;
void dfs(int pos, int val) {
  if (pos > n) {
    ans.push_back(val);
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i] == 0 && G[pos][i] != -1) {
      vis[i] = 1;
      dfs(pos + 1, val + G[pos][i]);
      vis[i] = 0;
    }
  }
  dfs(pos + 1, val);
}
int main() {
  int k, t, x, y, z;
  scanf("%d%d%d", &n, &k, &t);
  memset(G, -1, sizeof(G));
  for (int i = 0; i < k; i++) {
    scanf("%d%d%d", &x, &y, &z);
    G[x][y] = z;
  }
  memset(vis, 0, sizeof(vis));
  dfs(1, 0);
  sort(ans.begin(), ans.end());
  printf("%d\n", ans[t - 1]);
}
