#include <iostream>
#include <fstream>
#include <cstdio>

#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <queue>
#include <deque>
#include <cmath>
#include <set>
#include <map>

#include <ctime>
#include <cstdlib>
#include <cassert>
#include <windows.h>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;

const int N = (int) 1e2;

struct node {
    int u, v, val;    
};

int n, k, t;
node a[N];
vector <int> v;
bool used1[N], used2[N];

void Brute ( int pos, int cur ) {
    if ( pos == k ) {
        v.push_back(cur);
        return;
    }
    
    if ( !used1[a[pos].v] && !used2[a[pos].u] ) {
        used1[a[pos].v] = true;
        used2[a[pos].u] = true;
        
        Brute(pos + 1, cur + a[pos].val);
        
        used1[a[pos].v] = false;
        used2[a[pos].u] = false;
    }

    Brute(pos + 1, cur);
}

int main () {
    freopen(".in", "r", stdin);
    freopen(".out", "w", stdout);
    //ifstream cin (".in");
    //ofstream cout(".out");

    cin >> n >> k >> t;
    for ( int i = 0; i < k; i++ ) {
        cin >> a[i].u >> a[i].v >> a[i].val;
    }

    Brute(0, 0);

    sort(v.begin(), v.end());
    cout << v[t - 1] << endl;

    return 0; 
}

