
#include <bits/stdc++.h>

using namespace std;

#include <ext/rope>

using namespace __gnu_cxx;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;

#define int long long


typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;


#define add push_back
#define rem pop_back
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define REV(x) reverse(ALL(x))
#define F first
#define S second
#define DEBUG(x) cout << #x << " " << x << endl;
#define forn(i, a, b) for(int i = a; i <= b; i++)


template<typename T1, typename T2> auto max ( T1 a, T2 b ) { auto max = a > b ? a : b; return max; }
template<typename T1, typename T2> auto min ( T1 a, T2 b ) { auto min = a < b ? a : b; return min; }
template<typename T1, typename T2> void updmax ( T1 &a, T2 b ) { a = a > b ? a : b; }
template<typename T1, typename T2> void updmin ( T1 &a, T2 b ) { a = a < b ? a : b; }


const double EPS = 1e-9;
const double PI = acos ( -1. );
const int mod = 1e9 + 7;
int inf = __INT64_MAX__;
string YN[] = {"NO", "YES"};


#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a)*((b)/gcd(a,b)))


inline int gcd_e( int a, int b, int & x, int & y )
{
        if ( !a ) {
                x = 0;
                y = 1;
                return b;
        }
        int x1, y1;
        int d = gcd_e ( b % a, a, x1, y1 );
        x = y1 - ( b / a ) * x1;
        y = x1;
        return d;
}


inline int div_mod( int a, int b, int m = mod )
{
        int x, y;
        int g = gcd_e( b, m, x, y );
        x = ( x % m + m ) % m;
        return ( a * x ) % m;
}


int pow_mod ( int a, int n, int m = mod )
{
        int res = 1;
        while ( n ) {
                if ( n & 1 )
                        res = ( res * a ) % m;
                a = ( a * a ) % m;
                n >>= 1;
        }
        return res;
}




int px[] = { 1, -1, 0, 0 };
int py[] = { 0, 0, -1, 1 };
int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
int dy[] = { 0, 1, 0, -1, 1, -1, 1, -1 };


//tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> tr;


static const int MAXN = 1 << 20;
static int a[MAXN], b[MAXN], p[MAXN], c[20][20];

int n, m, k;
int res, cnt[MAXN];
string s;

vector<int> ans;
vector<int> used;
void rec( int i, int s, vector<int> used ){

	if( i == n ){
		ans.add( s );
		return;
	}
	rec( i + 1, s, used );
	for( int j = 0; j < n; j++ )
		if( !used[j] ){
			used[j] = 1;
			rec( i + 1, s + c[i][j], used );
			used[j] = 0;
		}
}
void solution()
{
	cin >> n >> m >> k;
	used.resize( n, 0 );
	while( m-- ){
		int x, y, w;
		cin >> x >> y >> w;
		x--;
		y--;
		c[x][y] = w;
	}
	rec( 0, 0, used );
	sort( ALL( ans ) );
	cout << ans[k - 1] << endl;
}


int32_t main ( )
{

        //freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdout);

        ios_base::sync_with_stdio ( false ); cin.tie ( nullptr ); cout.tie ( nullptr );
        //cout.precision(15);

        int query = 1;
        // cin >> query;

        while ( query-- ) solution();

        return 0;

}
